# transformers

`transformers` is BERT, Qwen3, Qwen3.5 (text), Granite MoE, LFM3, Qwen2.5, ResNet, ViT and CLIP in Agentica, for inference. It has BERT (`bert-base-uncased` and its relatives), Qwen3 and Qwen2.5 (the forward, generation with a KV cache, and the chat template), ResNet-18 and ResNet-50 and ViT-B/16 (image classification), CLIP ViT-B/32 (image and text embeddings, zero-shot classification), and the tokenizers of BERT, Qwen and CLIP: they read the `tokenizer.json` that sits beside a Hugging Face checkpoint and give the same ids as Hugging Face `tokenizers`.

The sections are on their own pages:

- [Models](https://www.agentica-lang.com/ml/transformers/models/index.md): BERT, DistilBERT, ResNet, ViT, Qwen3, Qwen3.5, Granite MoE and LFM3.
- [Generation](https://www.agentica-lang.com/ml/transformers/generation/index.md): generation with a KV cache, the chat template, and zero-shot classification with CLIP.
- [Tokenizers](https://www.agentica-lang.com/ml/transformers/tokenizers/index.md): the tokenizer example, WordPiece, byte-level BPE, CLIP's BPE and the Unicode tables.
- [Errors](https://www.agentica-lang.com/ml/transformers/errors/index.md): what the tokenizers refuse instead of silently giving other ids.

## Pages in this section

- [models](https://www.agentica-lang.com/ml/transformers/models/index.md): BERT, DistilBERT, ResNet, ViT, Qwen3, Qwen3.5, Qwen4-Exp, Granite MoE, LFM3 and Llama in Agentica, with their loading, forward and checks against Hugging Face.
- [generation](https://www.agentica-lang.com/ml/transformers/generation/index.md): Generation with a KV cache, the chat template, and zero-shot classification with CLIP.
- [tokenizers](https://www.agentica-lang.com/ml/transformers/tokenizers/index.md): The WordPiece, byte-level BPE and CLIP tokenizers, the tokenizer example and the Unicode tables they use.
- [errors](https://www.agentica-lang.com/ml/transformers/errors/index.md): What the tokenizers refuse instead of silently giving other ids than Hugging Face's.
