Downloads · 30 days
13
30% of all-time downloads
Adi-cookieNmilk/writing-tools-qwen3
writing-tools-qwen3 is a text generation model from Adi-cookieNmilk. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter for Qwen3-4B-Instruct-2507, fine-tuned for three Apple Intelligence–style writing tasks:
Downloads · 30 days
13
30% of all-time downloads
All-time downloads
44
Public
Repo size
35.1 MB
Likes
0
Public
Click a slice to open those files.
.safetensors23.6 MB · 67%
From the Hugging Face model README
LoRA adapter for Qwen3-4B-Instruct-2507, fine-tuned for three Apple Intelligence–style writing tasks:
subject, body, tone)QLoRA 4-bit NF4 fine-tuning (r=16, α=32) on ~3.6k SFT examples. Part of writing-tools-nlp, which also implements speculative decoding, guided generation, and MLX on-device inference.
| Metric | Base Qwen3-4B | Fine-tuned |
|---|---|---|
| ROUGE-1 | 0.3877 | 0.5359 |
| ROUGE-2 | 0.1905 | 0.3788 |
| ROUGE-L | 0.3139 | 0.4838 |
| BERTScore-F1 | 0.8756 | 0.9136 |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen3-4B-Instruct-2507"
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "aditya-ice/writing-tools-qwen3")
tokenizer = AutoTokenizer.from_pretrained(base)
messages = [
{"role": "system", "content": "You are a writing assistant. Summarise the following text in one concise paragraph."},
{"role": "user", "content": "Your text here..."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))