Downloads · 30 days
19
19% of all-time downloads
amiya/qwen2.5-7b-gec-v3
qwen2.5-7b-gec-v3 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-7B-Instruct for English grammatical error correction (GEC). LoRA was trained against the 4-bit MLX quantization of the base, then fused and dequantized to bf16 for distribution. +0.018 F…
Downloads · 30 days
19
19% of all-time downloads
All-time downloads
98
Public
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
LoRA fine-tune of Qwen/Qwen2.5-7B-Instruct for English grammatical error correction (GEC). LoRA was trained against the 4-bit MLX quantization of the base, then fused and dequantized to bf16 for distribution. +0.018 F0.5 over the 3B v2 model on the same held-out BEA-dev split.
ERRANT scores on a 100-sample held-out BEA-dev split (ABCN.dev.gold.bea19.m2, identity rows skipped, post-process: trailing-space-punct + space-collapse + leading-cap):
| Model | Precision | Recall | F0.5 |
|---|---|---|---|
| v1 (3B, BEA only) | 0.543 | 0.365 | 0.495 |
| v2 (3B, BEA+Coedit) | 0.589 | 0.386 | 0.533 |
| v3 (7B, BEA+Coedit+Owishiboo+sarayusapa) | 0.622 | 0.378 | 0.551 |
Best snapshot: iter 4000 (val 0.252). Training also tested iter 1000 (0.504), iter 2500 (0.532), iter 5000 (0.535).
from mlx_lm import generate, load
model, tokenizer = load("amiya/qwen2.5-7b-gec-v3")
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-7b-gec-v3") works the same.
Correct the grammar of the user text. Preserve meaning.
Use that exact prompt. Chat template is Qwen ChatML.
max_new_tokens ~ 1.5× the prompt lengthscripts/eval_mlx_gec.py --post-process in the source repo) is worth +0.01–0.02 F0.5mlx-community/Qwen2.5-7B-Instruct-4bit (4-bit quantised) — fused weights here are dequantised to bf16| Source | Pairs | Notes |
|---|---|---|
| BEA-2019 W&I+LOCNESS train | 22,668 | minimal-edit gold |
Grammarly Coedit task=gec | 19,823 | instruction-tuned GEC |
| Owishiboo/grammar-correction | 5,099 | small but clean |
| sarayusapa/Grammar_Error_Correction | 40,000 (capped) | larger, Asian-learner |
| Total train | 86,715 | |
| Validation | 875 | random split |
Identity rows dropped; sentences over 50 words dropped from sarayusapa to keep distribution focused.
| Input | Output |
|---|---|
He go to school | He goes to school |
I are happy | I am happy |
she walk fast | She walks fast. |
they was tired yesterday | They were tired yesterday. |
she have a cat | She has a cat. |
mlx_lm.convert -q --q-bits 4.@misc{qwen25_7b_gec_v3,
title = {qwen2.5-7b-gec-v3: LoRA-tuned Qwen2.5-7B for English GEC},
author = {amiya},
year = {2026},
url = {https://huggingface.co/amiya/qwen2.5-7b-gec-v3}
}
Datasets: Bryant et al. BEA-2019 Shared Task. Raheja et al. CoEdIT. Owishiboo, sarayusapa public HF datasets.