Downloads · 30 days
0
Ak137/qwen3.5-0.8B-spanish-ocr-lora
qwen3.5-0.8B-spanish-ocr-lora is a machine learning model from Ak137. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
- Developed by: Ak137 - License: apache-2.0 - Finetuned from model : unsloth/Qwen3.5-0.8B
Downloads · 30 days
0
Access
Public
Updated Mar 24, 2026
Repo size
72.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors52.8 MB · 72%
From the Hugging Face model README
This qwen3_5 model was trained 2x faster with Unsloth
LoRA adapter for Qwen3.5-0.8B fine-tuned on historical Spanish manuscript images.
| Split | CER |
|---|---|
| Validation (baseline) | 0.1414 |
| Validation (fine-tuned) | 0.0559 |
| Test (fine-tuned) | 0.0309 |
| Param | Value |
|---|---|
| Base model | Qwen3.5-0.8B |
| LoRA r / α / dropout | 16 / 32 / 0.0 |
| Learning rate | 1e-4 (cosine schedule) |
| Epochs | 5 |
| Effective batch size | 24 |
| Max image dim | 2048 px |
| Data augmentation | True |
| Train / Val / Test | ~2000 / 500 / 500 samples |
ſ → sç/Ç → z/Zã→an, õ→on, ẽ→en, ũ→un, ĩ→inđ → deñ)from unsloth import FastVisionModel
from PIL import Image
model, tokenizer = FastVisionModel.from_pretrained("Ak137/qwen3.5-0.8B-spanish-ocr-lora", load_in_4bit=False)
FastVisionModel.for_inference(model)
image = Image.open("manuscript.jpg")
w, h = image.size
if max(w, h) > 2048:
scale = 2048 / max(w, h)
image = image.resize((int(w*scale), int(h*scale)))
messages = [{{"role": "user", "content": [
{{"type": "text", "text": "Transcribe the text in this historical Spanish manuscript image."}},
{{"type": "image"}}
]}}]
input_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
inputs = tokenizer(image, input_text, add_special_tokens=False, return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))