Downloads · 30 days
11
9% of all-time downloads
amiya/qwen2.5-3b-gec-v2
qwen2.5-3b-gec-v2 is a text generation model from amiya. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
LoRA fine-tune of Qwen/Qwen2.5-3B-Instruct for English grammatical error correction (GEC). v2 improvements over qwen2.5-3b-gec-bea2019:
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
121
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
LoRA fine-tune of Qwen/Qwen2.5-3B-Instruct for English grammatical error correction (GEC). v2 improvements over qwen2.5-3b-gec-bea2019:
| Setting | Precision | Recall | F0.5 |
|---|---|---|---|
| v2 (post-processed, single-pass) | 0.589 | 0.386 | 0.533 |
| v2 + iterative (max-iter 2) | 0.575 | 0.407 | 0.531 |
| v1 (BEA only) | 0.543 | 0.365 | 0.495 |
Scored with ERRANT on a 100-sample held-out BEA-dev split (ABCN.dev.gold.bea19.m2, identity rows skipped). Post-processing strips a small set of BEA-2019 tokenization artifacts (trailing " ." → ".", collapsed double spaces, source-aligned leading-cap).
Validation loss trajectory (held-out 500-pair mix of BEA + Coedit):
| Iter | Val |
|---|---|
| 1 (baseline) | 1.981 |
| 500 | 0.367 |
| 1000 | 0.297 |
| 1500 | 0.319 |
| 2000 | 0.251 |
| 2500 | 0.260 |
| 3000 | 0.231 |
| 3500 | 0.160 (best, promoted) |
| 4000 | 0.248 |
| 4500 | 0.248 |
| 5000 | 0.167 |
Trained 5,000 iters on an Apple M2 Max in ~36 minutes (peak memory 10.5 GB).
from mlx_lm import generate, load
model, tokenizer = load("amiya/qwen2.5-3b-gec-v2")
prompt = tokenizer.apply_chat_template(
[
{"role": "system", "content": "Correct the grammar of the user text. Preserve meaning."},
{"role": "user", "content": "He go to school"},
],
tokenize=False,
add_generation_prompt=True,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=80))
# -> "He goes to school"
PyTorch users: transformers.AutoModelForCausalLM.from_pretrained("amiya/qwen2.5-3b-gec-v2") works the same.
Correct the grammar of the user text. Preserve meaning.
Use that exact prompt for in-distribution behavior. Chat template is Qwen's ChatML.
max_new_tokens ~ 1.5× the prompt length." .", collapses runs of whitespace, and aligns leading capitalisation to the input. Worth +0.01–0.02 F0.5.Qwen/Qwen2.5-3B-Instruct (3.09 B params)ABC.train.gold.bea19.m2 → 22,668 unique src→tgt pairs after dropping identity rows.train.jsonl, filtered to task == "gec" → 19,823 pairs after stripping instruction prefixes.The v1 model is BEA-only and uses a smaller LoRA (16 layers). v2 doubles LoRA capacity and adds Coedit data; the gains come about evenly from both. Use v2 unless you specifically want a smaller-footprint adapter.
@misc{qwen25_3b_gec_v2,
title = {qwen2.5-3b-gec-v2: LoRA-tuned Qwen2.5-3B for English GEC},
author = {amiya},
year = {2026},
url = {https://huggingface.co/amiya/qwen2.5-3b-gec-v2}
}
Datasets: Bryant et al. The BEA-2019 Shared Task on GEC. Raheja et al. CoEdIT: Text Editing by Task-Specific Instruction Tuning.