Text Generation
Transformers
Safetensors
MLX
Tamil
English
gemma3_text
tamil
tanglish
colloquial-tamil
chat
gemma3
translation
transliteration
question-answering
natural-language-inference
math
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use Felamity-Technologies/Minmini-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Felamity-Technologies/Minmini-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Felamity-Technologies/Minmini-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Felamity-Technologies/Minmini-1B") model = AutoModelForCausalLM.from_pretrained("Felamity-Technologies/Minmini-1B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use Felamity-Technologies/Minmini-1B with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("Felamity-Technologies/Minmini-1B") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use Felamity-Technologies/Minmini-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Felamity-Technologies/Minmini-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felamity-Technologies/Minmini-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Felamity-Technologies/Minmini-1B
- SGLang
How to use Felamity-Technologies/Minmini-1B 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 "Felamity-Technologies/Minmini-1B" \ --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": "Felamity-Technologies/Minmini-1B", "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 "Felamity-Technologies/Minmini-1B" \ --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": "Felamity-Technologies/Minmini-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - MLX LM
How to use Felamity-Technologies/Minmini-1B with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Felamity-Technologies/Minmini-1B"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Felamity-Technologies/Minmini-1B" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felamity-Technologies/Minmini-1B", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use Felamity-Technologies/Minmini-1B with Docker Model Runner:
docker model run hf.co/Felamity-Technologies/Minmini-1B
- Atomic Chat
Minmini-1B v2: fine-tuned from gemma-3-1b-it (v1 kept on branch 'v1')
Browse files- README.md +42 -41
- chat_template.jinja +42 -11
- model.safetensors +1 -1
- tokenizer_config.json +3 -3
README.md
CHANGED
|
@@ -3,7 +3,7 @@ license: gemma
|
|
| 3 |
language:
|
| 4 |
- ta
|
| 5 |
- en
|
| 6 |
-
base_model: google/gemma-3-1b-
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
library_name: transformers
|
| 9 |
tags:
|
|
@@ -14,7 +14,6 @@ tags:
|
|
| 14 |
- question-answering
|
| 15 |
- natural-language-inference
|
| 16 |
datasets:
|
| 17 |
-
- ai4bharat/IndicCorpV2
|
| 18 |
- Divyanshu/indicxnli
|
| 19 |
- ai4bharat/indic-align
|
| 20 |
- CohereForAI/aya_dataset
|
|
@@ -29,7 +28,7 @@ model-index:
|
|
| 29 |
name: IndicXNLI (Tamil, test, 1,000 pairs)
|
| 30 |
metrics:
|
| 31 |
- type: accuracy
|
| 32 |
-
value:
|
| 33 |
name: Accuracy (Tamil-Bench prompt)
|
| 34 |
- task:
|
| 35 |
type: question-answering
|
|
@@ -39,10 +38,10 @@ model-index:
|
|
| 39 |
name: IndicQA (Tamil, 1,000 questions)
|
| 40 |
metrics:
|
| 41 |
- type: f1
|
| 42 |
-
value: 52.
|
| 43 |
name: F1
|
| 44 |
- type: exact_match
|
| 45 |
-
value:
|
| 46 |
name: Exact match
|
| 47 |
- task:
|
| 48 |
type: translation
|
|
@@ -52,7 +51,7 @@ model-index:
|
|
| 52 |
name: FLORES-200 devtest (eng_Latn-tam_Taml, 5-shot)
|
| 53 |
metrics:
|
| 54 |
- type: chrf
|
| 55 |
-
value:
|
| 56 |
name: chrF
|
| 57 |
- task:
|
| 58 |
type: translation
|
|
@@ -62,37 +61,38 @@ model-index:
|
|
| 62 |
name: FLORES-200 devtest (tam_Taml-eng_Latn, 5-shot)
|
| 63 |
metrics:
|
| 64 |
- type: chrf
|
| 65 |
-
value: 45.
|
| 66 |
name: chrF
|
| 67 |
---
|
| 68 |
|
| 69 |
# Minmini-1B
|
| 70 |
|
| 71 |
> **Beats 105-billion-parameter Sarvam on Tamil inference and reading comprehension, at 1/100th the size.**
|
| 72 |
-
> IndicXNLI
|
| 73 |
|
| 74 |
-
**Minmini** (மின்மினி, "firefly") is a 1-billion-parameter Tamil language model built on Google's Gemma-3-1B and
|
| 75 |
|
| 76 |
These are **supervised, in-format** results: Minmini was fine-tuned on these task formats, while the models it is compared with were not. It is a small specialist, not a general assistant. See [Limitations](#limitations).
|
| 77 |
|
| 78 |
## What Minmini is best for
|
| 79 |
|
| 80 |
-
Minmini is best at tasks that work from text you give it: answering from a passage, checking a claim against a statement, and translating. It is not a knowledge source and
|
| 81 |
|
| 82 |
| Use | Fit | Evidence |
|
| 83 |
| --- | --- | --- |
|
| 84 |
-
| Answering questions from a Tamil passage (support docs, FAQs, forms) | **Best** | IndicQA F1 52.
|
| 85 |
-
| Checking whether a Tamil statement follows from, contradicts or is unrelated to a text | **Best** | IndicXNLI
|
| 86 |
-
| English↔Tamil translation of short sentences | Good | FLORES chrF
|
| 87 |
-
|
|
|
|
|
|
|
|
| 88 |
| On-device or offline Tamil NLP | Good | 1B parameters, 2 GB in bf16; runs on a laptop |
|
| 89 |
-
| Facts, general knowledge, exam questions | **Not suitable** | MILU
|
| 90 |
-
|
|
| 91 |
-
| Long-form writing or multi-turn chat | **Not suitable** | Loops under greedy decoding; loses the thread after a few sentences |
|
| 92 |
|
| 93 |
## How to use
|
| 94 |
|
| 95 |
-
The weights are standard Gemma-3 safetensors (bf16) and load in both transformers and MLX.
|
| 96 |
|
| 97 |
### transformers
|
| 98 |
|
|
@@ -111,7 +111,7 @@ print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True
|
|
| 111 |
# இன்று வானிலை மிகவும் சூடாக உள்ளது.
|
| 112 |
```
|
| 113 |
|
| 114 |
-
For free-form replies longer than a sentence or two,
|
| 115 |
|
| 116 |
### MLX (Apple silicon)
|
| 117 |
|
|
@@ -170,7 +170,7 @@ The exact items Tamil-Bench's leaderboard uses: the first 200 IndicXNLI pairs an
|
|
| 170 |
|
| 171 |
| Model | IndicXNLI accuracy % (n=200) | IndicQA EM / F1 (n=100) |
|
| 172 |
| --- | --- | --- |
|
| 173 |
-
| **Minmini-1B** | **
|
| 174 |
| Gemini 3.8 Flash | 75.8 | 20.0 / 42.4 |
|
| 175 |
| Claude Sonnet 5.5 | 75.5 | 22.0 / 43.1 |
|
| 176 |
| GLM 5.3 Flash | 71.5 | 19.0 / 36.8 |
|
|
@@ -188,10 +188,10 @@ Other models' scores are from the [Tamil-Bench leaderboard](https://logicinczo.g
|
|
| 188 |
|
| 189 |
| Task | Minmini-1B | Sarvam-105B |
|
| 190 |
| --- | --- | --- |
|
| 191 |
-
| IndicXNLI accuracy | **
|
| 192 |
-
| IndicQA EM / F1, all questions | **
|
| 193 |
-
| IndicQA F1, answerable questions only |
|
| 194 |
-
| MILU accuracy (5-shot) |
|
| 195 |
|
| 196 |
### Translation and general benchmarks
|
| 197 |
|
|
@@ -199,46 +199,51 @@ lm-eval 0.4.13, full test sets, translation and MILU 5-shot, others 0-shot, plai
|
|
| 199 |
|
| 200 |
| Task | Minmini-1B |
|
| 201 |
| --- | --- |
|
| 202 |
-
| FLORES en→ta / ta→en (chrF) |
|
| 203 |
-
| IN22-Gen en→ta / ta→en (chrF) |
|
| 204 |
-
| IN22-Conv en→ta / ta→en (chrF) |
|
| 205 |
-
| MILU / Belebele / MMLU (ta) |
|
| 206 |
-
| XCOPA / MultiBLiMP (ta) |
|
| 207 |
|
| 208 |
## Training
|
| 209 |
|
| 210 |
All training ran on one 24 GB Apple M5 Pro MacBook with MLX, using LoRA (rank 64 on all attention and MLP projections).
|
| 211 |
|
| 212 |
-
1. **
|
| 213 |
-
2. **Five supervised fine-tuning stages** (about
|
| 214 |
- chat format, NLI, QA and general instructions (IndicXNLI, IndicSQuAD, Aya, IndicAlign);
|
| 215 |
- QA rebuilt so the model learns real "no answer" cases;
|
| 216 |
- NLI with shuffled answer options, twice, to remove a letter-position bias;
|
| 217 |
- English↔Tamil translation (IndicAlign sentence pairs).
|
| 218 |
-
3. **Weight blend:** the released model is 0.3 × the stage-4 model (
|
| 219 |
|
| 220 |
All training text was n-gram decontaminated against MILU, IndicXNLI-test, IndicQA, FLORES and IN22. No test items were used.
|
| 221 |
|
| 222 |
### Findings
|
| 223 |
|
| 224 |
-
- **
|
| 225 |
-
- **
|
| 226 |
-
- **
|
| 227 |
|
| 228 |
## Limitations
|
| 229 |
|
| 230 |
- **Supervised, in-format:** 50–100% of the NLI and 60–75% of the QA fine-tuning examples used Tamil-Bench's prompt formats. The comparison models were evaluated zero-shot. The results show a small specialist can match large general models on these two tasks, not that it is generally stronger.
|
| 231 |
-
- **
|
|
|
|
| 232 |
- **Not evaluated:** safety, toxicity, bias, long-form generation and multi-turn chat. There was no human evaluation of fluency.
|
| 233 |
- **Tokenizer:** Gemma's tokenizer uses about 2.4 tokens per Tamil word, so Tamil text is slower and costlier than with a Tamil-specific tokenizer.
|
| 234 |
- Do not use Minmini for medical, legal, financial or other high-stakes decisions.
|
| 235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
## Licence and attribution
|
| 237 |
|
| 238 |
Minmini-1B is a derivative of Gemma and is distributed under the [Gemma Terms of Use](https://ai.google.dev/gemma/terms). Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. Use of this model must comply with the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy), and anyone you share it with is bound by the same terms.
|
| 239 |
|
| 240 |
Training data:
|
| 241 |
-
- [IndicCorpV2](https://huggingface.co/datasets/ai4bharat/IndicCorpV2) (AI4Bharat, CC0)
|
| 242 |
- [IndicXNLI](https://huggingface.co/datasets/Divyanshu/indicxnli) (CC0)
|
| 243 |
- IndicSQuAD (CC-BY-4.0)
|
| 244 |
- [IndicAlign](https://huggingface.co/datasets/ai4bharat/indic-align) (AI4Bharat, CC-BY-4.0)
|
|
@@ -246,10 +251,6 @@ Training data:
|
|
| 246 |
|
| 247 |
Evaluation uses [Tamil-Bench](https://logicinczo.github.io/tamil-bench/), FLORES-200 and IN22.
|
| 248 |
|
| 249 |
-
## Creator
|
| 250 |
-
|
| 251 |
-
Nafize Ahamed F
|
| 252 |
-
|
| 253 |
## Citation
|
| 254 |
|
| 255 |
```bibtex
|
|
|
|
| 3 |
language:
|
| 4 |
- ta
|
| 5 |
- en
|
| 6 |
+
base_model: google/gemma-3-1b-it
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
library_name: transformers
|
| 9 |
tags:
|
|
|
|
| 14 |
- question-answering
|
| 15 |
- natural-language-inference
|
| 16 |
datasets:
|
|
|
|
| 17 |
- Divyanshu/indicxnli
|
| 18 |
- ai4bharat/indic-align
|
| 19 |
- CohereForAI/aya_dataset
|
|
|
|
| 28 |
name: IndicXNLI (Tamil, test, 1,000 pairs)
|
| 29 |
metrics:
|
| 30 |
- type: accuracy
|
| 31 |
+
value: 75.0
|
| 32 |
name: Accuracy (Tamil-Bench prompt)
|
| 33 |
- task:
|
| 34 |
type: question-answering
|
|
|
|
| 38 |
name: IndicQA (Tamil, 1,000 questions)
|
| 39 |
metrics:
|
| 40 |
- type: f1
|
| 41 |
+
value: 52.1
|
| 42 |
name: F1
|
| 43 |
- type: exact_match
|
| 44 |
+
value: 43.9
|
| 45 |
name: Exact match
|
| 46 |
- task:
|
| 47 |
type: translation
|
|
|
|
| 51 |
name: FLORES-200 devtest (eng_Latn-tam_Taml, 5-shot)
|
| 52 |
metrics:
|
| 53 |
- type: chrf
|
| 54 |
+
value: 46.8
|
| 55 |
name: chrF
|
| 56 |
- task:
|
| 57 |
type: translation
|
|
|
|
| 61 |
name: FLORES-200 devtest (tam_Taml-eng_Latn, 5-shot)
|
| 62 |
metrics:
|
| 63 |
- type: chrf
|
| 64 |
+
value: 45.1
|
| 65 |
name: chrF
|
| 66 |
---
|
| 67 |
|
| 68 |
# Minmini-1B
|
| 69 |
|
| 70 |
> **Beats 105-billion-parameter Sarvam on Tamil inference and reading comprehension, at 1/100th the size.**
|
| 71 |
+
> IndicXNLI 75.0% vs 58.2%; IndicQA F1 52.1 vs 44.5 (1,000 items each, same prompts).
|
| 72 |
|
| 73 |
+
**Minmini** (மின்மினி, "firefly") is a 1-billion-parameter Tamil language model built on Google's Gemma-3-1B-IT and fine-tuned entirely on one laptop. On Tamil-Bench's leaderboard items it scores higher than Gemini 3.8 Flash and Claude Sonnet 5.5 on Tamil natural-language inference (79.5%) and reading comprehension (IndicQA F1 55.1). It also translates English↔Tamil (FLORES chrF 46.8 / 45.1) and keeps the base model's step-by-step arithmetic in English.
|
| 74 |
|
| 75 |
These are **supervised, in-format** results: Minmini was fine-tuned on these task formats, while the models it is compared with were not. It is a small specialist, not a general assistant. See [Limitations](#limitations).
|
| 76 |
|
| 77 |
## What Minmini is best for
|
| 78 |
|
| 79 |
+
Minmini is best at tasks that work from text you give it: answering from a passage, checking a claim against a statement, and translating. It is not a knowledge source, and its reasoning is reliable only for simple problems in English.
|
| 80 |
|
| 81 |
| Use | Fit | Evidence |
|
| 82 |
| --- | --- | --- |
|
| 83 |
+
| Answering questions from a Tamil passage (support docs, FAQs, forms) | **Best** | IndicQA F1 52.1 (answerable questions 47.8); says "no answer in the passage" reliably (AUC 0.89) |
|
| 84 |
+
| Checking whether a Tamil statement follows from, contradicts or is unrelated to a text | **Best** | IndicXNLI 75.0%, robust to answer-option order (75.0–75.7%) |
|
| 85 |
+
| English↔Tamil translation of short sentences | Good | FLORES chrF 46.8 / 45.1 |
|
| 86 |
+
| Simple arithmetic and logic, in English | Fair | 5/5 simple test questions in English, with correct step-by-step working |
|
| 87 |
+
| Simple arithmetic and logic, in Tamil | Weak | 3/5 in Tamil; makes arithmetic slips (e.g. writes 12 − 5 = 5) |
|
| 88 |
+
| Drafting short Tamil text (messages, lists, short paragraphs) | Fair | Readable, well-structured Tamil, but with occasional wrong words and invented facts |
|
| 89 |
| On-device or offline Tamil NLP | Good | 1B parameters, 2 GB in bf16; runs on a laptop |
|
| 90 |
+
| Facts, general knowledge, exam questions | **Not suitable** | MILU 28.0% (chance is 25%); Belebele 36.9%, above chance but low; invents facts |
|
| 91 |
+
| Long-form writing or multi-turn chat | **Not suitable** | Not evaluated; loses the thread in longer replies |
|
|
|
|
| 92 |
|
| 93 |
## How to use
|
| 94 |
|
| 95 |
+
The weights are standard Gemma-3 safetensors (bf16) and load in both transformers and MLX. The chat format is Gemma's; a system message is folded into the first user turn. Generation stops at `<end_of_turn>`.
|
| 96 |
|
| 97 |
### transformers
|
| 98 |
|
|
|
|
| 111 |
# இன்று வானிலை மிகவும் சூடாக உள்ளது.
|
| 112 |
```
|
| 113 |
|
| 114 |
+
For free-form replies longer than a sentence or two, sampling usually reads better than greedy decoding: `do_sample=True, temperature=0.7, top_p=0.95, repetition_penalty=1.1`.
|
| 115 |
|
| 116 |
### MLX (Apple silicon)
|
| 117 |
|
|
|
|
| 170 |
|
| 171 |
| Model | IndicXNLI accuracy % (n=200) | IndicQA EM / F1 (n=100) |
|
| 172 |
| --- | --- | --- |
|
| 173 |
+
| **Minmini-1B** | **79.5** | **44.0 / 55.1** |
|
| 174 |
| Gemini 3.8 Flash | 75.8 | 20.0 / 42.4 |
|
| 175 |
| Claude Sonnet 5.5 | 75.5 | 22.0 / 43.1 |
|
| 176 |
| GLM 5.3 Flash | 71.5 | 19.0 / 36.8 |
|
|
|
|
| 188 |
|
| 189 |
| Task | Minmini-1B | Sarvam-105B |
|
| 190 |
| --- | --- | --- |
|
| 191 |
+
| IndicXNLI accuracy | **75.0%** | 43.0% strict / 58.2% lenient |
|
| 192 |
+
| IndicQA EM / F1, all questions | **43.9 / 52.1** | 29.1 / 44.5 |
|
| 193 |
+
| IndicQA F1, answerable questions only | 47.8 | **54.0** |
|
| 194 |
+
| MILU accuracy (5-shot) | 28.0% | — |
|
| 195 |
|
| 196 |
### Translation and general benchmarks
|
| 197 |
|
|
|
|
| 199 |
|
| 200 |
| Task | Minmini-1B |
|
| 201 |
| --- | --- |
|
| 202 |
+
| FLORES en→ta / ta→en (chrF) | 46.8 / 45.1 |
|
| 203 |
+
| IN22-Gen en→ta / ta→en (chrF) | 41.0 / 42.2 |
|
| 204 |
+
| IN22-Conv en→ta / ta→en (chrF) | 36.1 / 37.3 |
|
| 205 |
+
| MILU / Belebele / MMLU (ta) | 28.6 / 36.9 / 24.9 |
|
| 206 |
+
| XCOPA / MultiBLiMP (ta) | 55.4 / 95.0 |
|
| 207 |
|
| 208 |
## Training
|
| 209 |
|
| 210 |
All training ran on one 24 GB Apple M5 Pro MacBook with MLX, using LoRA (rank 64 on all attention and MLP projections).
|
| 211 |
|
| 212 |
+
1. **Base model:** Google's instruction-tuned Gemma-3-1B-IT, which keeps Google's chat and reasoning post-training.
|
| 213 |
+
2. **Five supervised fine-tuning stages** (about 18 hours in all), each added to fix a weakness found by evaluation:
|
| 214 |
- chat format, NLI, QA and general instructions (IndicXNLI, IndicSQuAD, Aya, IndicAlign);
|
| 215 |
- QA rebuilt so the model learns real "no answer" cases;
|
| 216 |
- NLI with shuffled answer options, twice, to remove a letter-position bias;
|
| 217 |
- English↔Tamil translation (IndicAlign sentence pairs).
|
| 218 |
+
3. **Weight blend:** the released model is 0.3 × the stage-4 model (NLI and QA) + 0.7 × the stage-5 model (translation), averaged weight by weight.
|
| 219 |
|
| 220 |
All training text was n-gram decontaminated against MILU, IndicXNLI-test, IndicQA, FLORES and IN22. No test items were used.
|
| 221 |
|
| 222 |
### Findings
|
| 223 |
|
| 224 |
+
- **The base model matters more than Tamil pre-training for these tasks.** An earlier version of Minmini added 77 hours of Tamil continued pre-training to the raw `gemma-3-1b-pt` model before the same fine-tuning. It modelled raw Tamil text better (1.24 vs 1.53 bits per character), but it lost the base model's reasoning (3–4 of 10 simple questions vs 8 of 10). Fine-tuning `gemma-3-1b-it` directly matched it on NLI and QA, beat it on translation and answerable-question QA, and kept the reasoning.
|
| 225 |
+
- **Translated QA data carries a shortcut.** After the first fine-tuning stage the model answered "no answer" to almost every IndicQA question. The machine-translated unanswerable questions in IndicSQuAD carry a surface cue that human-written questions lack. Building unanswerables from other paragraphs of the same article fixed it.
|
| 226 |
+
- **Benchmark scores can hide position bias.** Models trained only on the benchmark's fixed answer order learn "entailment means A". Training with shuffled options removed this.
|
| 227 |
|
| 228 |
## Limitations
|
| 229 |
|
| 230 |
- **Supervised, in-format:** 50–100% of the NLI and 60–75% of the QA fine-tuning examples used Tamil-Bench's prompt formats. The comparison models were evaluated zero-shot. The results show a small specialist can match large general models on these two tasks, not that it is generally stronger.
|
| 231 |
+
- **Little knowledge, limited reasoning:** exam-knowledge benchmarks (MILU, MMLU) are near chance. Simple English arithmetic and logic work; Tamil arithmetic is unreliable. Open-ended factual answers are often wrong.
|
| 232 |
+
- **Fluency:** Tamil text is readable but less natural than a Tamil-pretrained model's, with occasional wrong word choices.
|
| 233 |
- **Not evaluated:** safety, toxicity, bias, long-form generation and multi-turn chat. There was no human evaluation of fluency.
|
| 234 |
- **Tokenizer:** Gemma's tokenizer uses about 2.4 tokens per Tamil word, so Tamil text is slower and costlier than with a Tamil-specific tokenizer.
|
| 235 |
- Do not use Minmini for medical, legal, financial or other high-stakes decisions.
|
| 236 |
|
| 237 |
+
## Versions
|
| 238 |
+
|
| 239 |
+
- **v2 (current):** fine-tuned from `google/gemma-3-1b-it`, as described above.
|
| 240 |
+
- **v1:** Tamil continued pre-training on `google/gemma-3-1b-pt`, then the same fine-tuning and blend (IndicXNLI 76.0%, IndicQA F1 52.4, FLORES chrF 44.7 / 45.6). Available on the `v1` branch of this repository.
|
| 241 |
+
|
| 242 |
## Licence and attribution
|
| 243 |
|
| 244 |
Minmini-1B is a derivative of Gemma and is distributed under the [Gemma Terms of Use](https://ai.google.dev/gemma/terms). Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. Use of this model must comply with the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy), and anyone you share it with is bound by the same terms.
|
| 245 |
|
| 246 |
Training data:
|
|
|
|
| 247 |
- [IndicXNLI](https://huggingface.co/datasets/Divyanshu/indicxnli) (CC0)
|
| 248 |
- IndicSQuAD (CC-BY-4.0)
|
| 249 |
- [IndicAlign](https://huggingface.co/datasets/ai4bharat/indic-align) (AI4Bharat, CC-BY-4.0)
|
|
|
|
| 251 |
|
| 252 |
Evaluation uses [Tamil-Bench](https://logicinczo.github.io/tamil-bench/), FLORES-200 and IN22.
|
| 253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
## Citation
|
| 255 |
|
| 256 |
```bibtex
|
chat_template.jinja
CHANGED
|
@@ -1,16 +1,47 @@
|
|
| 1 |
-
{{
|
| 2 |
-
{%- if messages
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
{%- else -%}
|
| 6 |
-
|
| 7 |
-
|
| 8 |
{%- endif -%}
|
| 9 |
-
{%- for
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
{%- endfor -%}
|
| 14 |
{%- if add_generation_prompt -%}
|
| 15 |
-
|
|
|
|
| 16 |
{%- endif -%}
|
|
|
|
| 1 |
+
{{ bos_token }}
|
| 2 |
+
{%- if messages[0]['role'] == 'system' -%}
|
| 3 |
+
{%- if messages[0]['content'] is string -%}
|
| 4 |
+
{%- set first_user_prefix = messages[0]['content'] + '
|
| 5 |
+
|
| 6 |
+
' -%}
|
| 7 |
+
{%- else -%}
|
| 8 |
+
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
|
| 9 |
+
|
| 10 |
+
' -%}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- set loop_messages = messages[1:] -%}
|
| 13 |
{%- else -%}
|
| 14 |
+
{%- set first_user_prefix = "" -%}
|
| 15 |
+
{%- set loop_messages = messages -%}
|
| 16 |
{%- endif -%}
|
| 17 |
+
{%- for message in loop_messages -%}
|
| 18 |
+
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
|
| 19 |
+
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 20 |
+
{%- endif -%}
|
| 21 |
+
{%- if (message['role'] == 'assistant') -%}
|
| 22 |
+
{%- set role = "model" -%}
|
| 23 |
+
{%- else -%}
|
| 24 |
+
{%- set role = message['role'] -%}
|
| 25 |
+
{%- endif -%}
|
| 26 |
+
{{ '<start_of_turn>' + role + '
|
| 27 |
+
' + (first_user_prefix if loop.first else "") }}
|
| 28 |
+
{%- if message['content'] is string -%}
|
| 29 |
+
{{ message['content'] | trim }}
|
| 30 |
+
{%- elif message['content'] is iterable -%}
|
| 31 |
+
{%- for item in message['content'] -%}
|
| 32 |
+
{%- if item['type'] == 'image' -%}
|
| 33 |
+
{{ '<start_of_image>' }}
|
| 34 |
+
{%- elif item['type'] == 'text' -%}
|
| 35 |
+
{{ item['text'] | trim }}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
{%- endfor -%}
|
| 38 |
+
{%- else -%}
|
| 39 |
+
{{ raise_exception("Invalid content type") }}
|
| 40 |
+
{%- endif -%}
|
| 41 |
+
{{ '<end_of_turn>
|
| 42 |
+
' }}
|
| 43 |
{%- endfor -%}
|
| 44 |
{%- if add_generation_prompt -%}
|
| 45 |
+
{{'<start_of_turn>model
|
| 46 |
+
'}}
|
| 47 |
{%- endif -%}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1999811137
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4cae2b4fa26cc319aca12f7762c93a196ed4d96c8b5bdac2f1e83216c63ea0b5
|
| 3 |
size 1999811137
|
tokenizer_config.json
CHANGED
|
@@ -16,10 +16,10 @@
|
|
| 16 |
"image_token": "<image_soft_token>"
|
| 17 |
},
|
| 18 |
"pad_token": "<pad>",
|
|
|
|
| 19 |
"sp_model_kwargs": null,
|
| 20 |
"spaces_between_special_tokens": false,
|
| 21 |
"tokenizer_class": "GemmaTokenizer",
|
| 22 |
"unk_token": "<unk>",
|
| 23 |
-
"use_default_system_prompt": false
|
| 24 |
-
|
| 25 |
-
}
|
|
|
|
| 16 |
"image_token": "<image_soft_token>"
|
| 17 |
},
|
| 18 |
"pad_token": "<pad>",
|
| 19 |
+
"processor_class": "Gemma3Processor",
|
| 20 |
"sp_model_kwargs": null,
|
| 21 |
"spaces_between_special_tokens": false,
|
| 22 |
"tokenizer_class": "GemmaTokenizer",
|
| 23 |
"unk_token": "<unk>",
|
| 24 |
+
"use_default_system_prompt": false
|
| 25 |
+
}
|
|
|