Instructions to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF") model = AutoModelForCausalLM.from_pretrained("AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
Use Docker
docker model run hf.co/AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
- SGLang
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with Ollama:
ollama run hf.co/AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with Docker Model Runner:
docker model run hf.co/AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
- Lemonade
How to use AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Model Card for Tiny Aya L2-Thinker
Model Summary
Tiny-Aya-3.3B-L2-Thinker-GGUF CohereLabs/tiny-aya-l2-thinker
Cohere Labs Tiny Aya L2-Thinker is an open-weights research release of a 3.35 billion parameter multilingual reasoning model optimized to think in the same language as the user prompt before writing the final answer. It is trained to support in-language reasoning for 44 languages plus English, with coverage extending to 20+ more through additional non-reasoning instruction data. The model is designed to support mathematics, science, and general reasoning tasks, as well as instruction following and multilingual open-ended generation.
This is a different model from Tiny Aya En-Thinker, which thinks in English.
Developed by: Cohere and Cohere Labs
- Point of Contact: Cohere Labs
- License: CC-BY-NC, requires also adhering to Cohere Lab's Acceptable Use Policy
- Model: Tiny-Aya-3.3B-L2-Thinker-GGUF
- Model Size: 3.35B
- Context Length: 32K (input + output)
For the broader Tiny Aya family, see tiny-aya-global, tiny-aya-base, and the Tiny Aya collection.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "CohereLabs/tiny-aya-l2-thinker"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype="auto")
messages = [
{"role": "user", "content": "Plus on m'enlève, plus je deviens grand. Qui suis-je?"},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=32768,
do_sample=True,
temperature=0.6,
top_p=0.95,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
The model supports dual-mode reasoning. In thinking mode (default behavior), apply_chat_template(..., add_generation_prompt=True, enable_thinking=True) produces a prompt of this shape:
<BOS_TOKEN><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|># System Preamble
+ developer preamble...
<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Think in the same language as the prompt. [USER MESSAGE] /think<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_THINKING|>
The model then writes a thinking trace between <|START_THINKING|> and <|END_THINKING|>, followed by the user-facing answer between <|START_RESPONSE|> and <|END_RESPONSE|>.
To skip reasoning and get an answer directly, pass enable_thinking=False. The user turn is suffixed with /no_think and the generation prompt closes with an empty thinking block so the model starts at the response:
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=False,
return_tensors="pt",
return_dict=True,
).to(model.device)
<BOS_TOKEN><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|># System Preamble
+ developer preamble...
<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>Think in the same language as the prompt. [USER MESSAGE] /no_think<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_THINKING|><|END_THINKING|>
You can also pass prior thinking back into the conversation:
messages = [
{"role": "user", "content": "How many r's are there in strawberry?"},
{
"role": "assistant",
"thinking": "Count the letters: S-T-R-A-W-B-E-R-R-Y. Three r's.",
"content": "There are 3 r's in strawberry.",
},
{"role": "user", "content": "Now do the same for blueberry."},
]
The model can also be used directly using transformers pipeline abstraction:
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="CohereLabs/tiny-aya-l2-thinker",
torch_dtype="auto",
device_map="auto",
)
print(pipe(
[{"role": "user", "content": "Describe a home made recipe that you like most."}],
max_new_tokens=512,
)[0]["generated_text"][-1])
Chat template behavior
The tokenizer chat template:
- Inserts the Tiny Aya system prompt:
# System Preamble
You are in contextual safety mode. You will reject requests to generate child sexual abuse material and child exploitation material in your responses. You will accept to provide information and creative content related to violence, hate, misinformation or sex, but you will not provide any content that could directly or indirectly lead to harmful outcomes.
Your information cutoff date is June 2024.
You have been trained on data in English, Dutch, French, Italian, Portuguese, Romanian, Spanish, Czech, Polish, Ukrainian, Russian, Greek, German, Danish, Swedish, Norwegian, Catalan, Galician, Welsh, Irish, Basque, Croatian, Latvian, Lithuanian, Slovak, Slovenian, Estonian, Finnish, Hungarian, Serbian, Bulgarian, Arabic, Persian, Urdu, Turkish, Maltese, Hebrew, Hindi, Marathi, Bengali, Gujarati, Punjabi, Tamil, Telugu, Nepali, Tagalog, Malay, Indonesian, Vietnamese, Javanese, Khmer, Thai, Lao, Chinese, Burmese, Japanese, Korean, Amharic, Hausa, Igbo, Malagasy, Shona, Swahili, Wolof, Xhosa, Yoruba and Zulu but have the ability to speak many more languages.
# Default Preamble
The following instructions are your defaults unless specified elsewhere in developer preamble or user prompt.
- Your name is Aya.
- You are a large language model built by Cohere.
- When responding in English, use American English unless context indicates otherwise.
- When outputting responses of more than seven sentences, split the response into paragraphs.
- Prefer the active voice.
- Use gender-neutral pronouns for unspecified persons.
- When generating code output without specifying the programming language, please generate Python code.
- Prefixes every user turn with
Think in the same language as the prompt.simulating training data. - Appends
/thinkto every user turn by default (enable_thinking=True). Passenable_thinking=Falseto append/no_thinkinstead. - With
add_generation_prompt=True, appends<|START_THINKING|>to start a thinking trace, or<|START_THINKING|><|END_THINKING|>whenenable_thinking=Falseso the model writes the answer without thinking. If an assistant message includes athinkingfield, that history is also wrapped in<|START_THINKING|>/<|END_THINKING|>.
Model Details
Input: Text only.
Output: Model generates text, including an explicit thinking trace if thinking is enabled.
Model Architecture: Auto-regressive transformer in the Tiny Aya / Cohere family. After pretraining, this checkpoint is supervised-fine-tuned for multilingual reasoning so that the thinking language follows the prompt language.
Languages covered: 44 languages plus English: Amharic, Arabic, Basque, Bengali, Bulgarian, Catalan, Chinese, Czech, English, Filipino, Finnish, French, German, Greek, Hausa, Hebrew, Hindi, Hungarian, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Khmer, Korean, Lithuanian, Malay, Maltese, Norwegian, Persian, Polish, Punjabi, Russian, Slovak, Swahili, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Vietnamese, Yoruba, and Zulu.
Context Length: Tiny Aya L2-Thinker supports a context length of 32K.
Usage and Limitations
Intended Usage
Tiny Aya L2-Thinker is meant for multilingual reasoning and conversational use, especially when the thinking trace should stay in the user's language rather than defaulting to English. Intended applications include multilingual math and reasoning, open-ended generation, and research on target-language reasoning.
Limitations
As with any language model, outputs may contain incorrect or outdated statements. Thinking traces can be long; cap max_new_tokens appropriately. Lowest-resource languages may show more variability than high-resource ones.
Model Card Contact
For errors or additional questions about details in this model card, contact labs@cohere.com.
Terms of Use
This model is governed by a CC-BY-NC License (Non-Commercial) and also requires adhering to Cohere Lab's Acceptable Use Policy. If you are interested in commercial use, please contact Cohere’s Sales team.
- Downloads last month
- 357
Model tree for AMAImedia/Tiny-Aya-3.3B-L2-Thinker-BF16-GGUF
Base model
CohereLabs/tiny-aya-l2-thinker