Redline Qwen3-0.6B
a compact English grammar corrector
2 min readupdated
The model performs a full fine-tuning (updating all parameters) of the Qwen3-0.6B language model to check grammar, spelling, and punctuation in English sentences. It takes text as input and returns the corrected version or leaves it unchanged if there are no errors. The main difference from alternatives like coedit-large is an extremely low false-positive rate (no-op rate), meaning the model does not rewrite correct text unnecessarily. The tool will be useful for bot developers, editors, and anyone who needs fast local text verification.
Key features
- High accuracy: Outperforms the larger coedit-large model on the JFLEG benchmark (59.02 GLEU vs 55.60).
- Gentle text handling: Leaves correct sentences unchanged in 87% of cases.
- Compactness: Based on an efficient architecture with a size of only 0.6B parameters.
- Specialization: Trained on a mix of human and synthetic datasets with an emphasis on preserving the original meaning.
What you can do
- Chatbot integration: Add automatic spelling and grammar checking to messengers or support services.
- Text editors: Integrate the model into local plugins for quick highlighting and error correction on the fly.
- Data processing pipelines: Use it to clean and correct large text corpora before training or analysis.
Example
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "ahmedoussama/redline-qwen3-0.6b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
INSTRUCTION = (
"Correct the grammar, spelling, and punctuation of the sentence. "
"Do not change its meaning or style. "
"Reply with the corrected sentence only. "
"If it is already correct, repeat it unchanged."
)
prompt = tok.apply_chat_template(
[{"role": "user", "content": INSTRUCTION + "\nShe go to school every days and dont like it."}],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
enc = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=160, do_sample=False)
print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True).strip())Read more
Details• Base model: Qwen/Qwen3-0.6B (full fine-tuning of all 596M parameters)
• JFLEG benchmark: 59.02 GLEU using greedy decoding
• Data: 149,843 correction pairs and 17,981 correct sentences
• Training: 1 epoch on a single NVIDIA T4 GPU in 5 hours 18 minutes using the LLaMA-Factory stack
• Limitations: English language only, sentences limited to 300 characters (long texts need to be split)










Comments