r/learnmachinelearning • u/townstormz • 22d ago
Help Fine-tuning a small model on textbooks to run offline locally on lower RAM 2-8 GB phones?
/r/MLQuestions/comments/1xtw91w/finetuning_a_small_model_on_textbooks_to_run/Hello, new to ML. Any opinions on this?
1
Upvotes
1
u/Massive_Distance_616 22d ago
The not stopping is usually a training-format issue rather than something you did wrong.
If the LoRA was trained on raw textbook text, the model learned to keep continuing text, and unless each example ended with the end-of-sequence token (or the chat template’s end-of-turn token) it never saw what stopping looks like.
Question-answer pairs in the model’s chat format would fix the stopping, but I wouldn’t expect the facts to stick reliably.
Fine-tuning is better at shaping behaviour and format than at storing facts, which is why your base model plus retrieval beat the fine-tune.
For a 2 GB phone I’d put the effort into chunking and retrieval with a small instruct model as the reader, and remember the OS, your app and the context window all share that memory, not just the weights.
For diagrams, I’d store each figure’s reference with its text chunk, so when retrieval finds the passage your app shows the figure itself instead of asking the model to fetch it.
Do you know how much RAM the model uses when it’s loaded on a phone?