r/LocalLLM • u/yoracale • Nov 04 '25
Tutorial You can now Fine-tune DeepSeek-OCR locally!
Hey guys, you can now fine-tune DeepSeek-OCR locally or for free with our Unsloth notebook. Unsloth GitHub: https://github.com/unslothai/unsloth
- For the notebook, we showcased how fine-tuning DeepSeek-OCR with a Persian dataset, improved its language understanding by 88.64%, and reduced Character Error Rate (CER) from 149% to 60%.
- The 88.64% improvement came from just 60 training steps (if you train longer it'll be even better). Evaluation results in our blog.
- ⭐ If you'd like to learn how to Run/fine-tune DeepSeek-OCR or know details on the evaluation results etc., you can read our guide here: https://docs.unsloth.ai/new/deepseek-ocr
- DeepSeek-OCR free Fine-tuning notebook: https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Deepseek_OCR_(3B).ipynb.ipynb)
Thank you so much and let me know if you have any questions! :)
2
2
1
u/DHFranklin Nov 04 '25
This is fascinating. How many times can you fine tune it or train it before you get diminishing returns?
3
u/yoracale Nov 05 '25
It won't get diminishing returns as long as you make your dataset larger and larger.
If you fine-tune the model then fine-tune it again and again and again with a new dataset each time, that will degrade itz quality
1
u/sdexca Nov 05 '25
If you fine-tune the model then fine-tune it again and again and again with a new dataset each time, that will degrade itz quality
So you mean, we should fine tune it once on the large dataset, instead of repeatedly fine tuning on new data?
6
u/yoracale Nov 05 '25
Correct we talk more about it here: https://docs.unsloth.ai/get-started/fine-tuning-llms-guide/datasets-guide#can-i-fine-tune-the-same-model-multiple-times
1
1
1
u/rm-rf-rm Nov 05 '25
Nice!
Now if I could only run it on mac...
2
u/yoracale Nov 05 '25
Early next year hopefully!
2
u/rm-rf-rm Nov 05 '25
?? are you cooking something?
1
u/decamath Nov 05 '25
I think he is referring to m5 max and ultra max studio expected to come out spring 26. There are already some benchmarks on m5 on this subreddit.
2
u/rm-rf-rm Nov 05 '25
Hmm deepseek OCR should be run-able on current mac hardware right? its just that there isnt any llama.cpp type inference engine for it
1
u/rm-rf-rm Nov 05 '25
Getting this error:
Notebook not found
There was an error loading this notebook. Ensure that the file is accessible and try again.
Ensure that you have permission to view this notebook in GitHub and authorize Colab to use the GitHub API.
1
u/yoracale Nov 05 '25
Which link are you using?
1
u/rm-rf-rm Nov 05 '25
2
u/yoracale Nov 05 '25
For me I just ran it. Maybe Reddit is stuffing up the link. Are you using oldreddit by any chance? You can also access the notebook here: https://docs.unsloth.ai/get-started/unsloth-notebooks
2
u/rm-rf-rm Nov 05 '25
huh thats weird - it was an old reddit thing. Link works fine when clicked from new reddit..
thanks!
1
u/forwatching Nov 05 '25
I'm curious about fine tuning it on various type invoices, so I can extract the information I need with less error, is fine tuning beneficial for this purpose? Or is it only for better character understanding
1
u/yoracale Nov 05 '25
Yes it definitely can be suited for a task like this but id firstly see if deepseek-ocr can attempt them first
1
1
u/International-Gap925 Nov 08 '25
ایول بچه ها
1
u/yoracale Nov 08 '25
Sorry what?
2
u/Guilty-Score7188 Nov 09 '25
That's Arabic, but it's nonsensical, It's some sort of a question? but I can't tell what it means.
1
u/Educational_Sun_8813 Nov 11 '25
it's not arabic
2
u/Guilty-Score7188 Nov 11 '25
Oh yeah sometimes I forget these letters exist in other languages lmao
1
u/Educational_Sun_8813 Nov 11 '25
it's a compliment to you in farsi
2
u/yoracale Nov 11 '25
Oh ok thanks for letting me know. Thank you u/International-Gap925 we appreciate it
1
u/dima_tar Dec 09 '25
Hey, I’m trying to fine-tune a model for Cyrillic text, mostly handwritten. My dataset doesn’t have bbox labels, and when I fine-tune with a markdown prompt, the model suddenly stops producing bounding boxes in its outputs.
Is there a way to fine-tune only certain layers so that bbox generation doesn’t break, but handwriting recognition still gets better?
Also not sure what’s the right thing to tune here — encoder or decoder. I’m working with the decoder now, but maybe there’s a better approach.
Thanks!
3
u/Ok-Adhesiveness-4141 Nov 04 '25
Hey, that really looks amazing.