What this folder is: Papers and documentation that apply to more than one of the three spam-classifier projects (MLX, Liquid, XAI). Project-specific references live inside each project's own docs/references/ folder.
All local links open files on your computer (no internet needed). Online links are provided as fallbacks and for the latest versions.
📄 Foundational Papers
These papers apply to all three LLM-focused projects. They cover the core ideas behind modern fine-tuning: the Transformer architecture, and parameter-efficient tuning with LoRA and QLoRA.
The original Transformer paper. Every modern LLM (Qwen, LFM2, GPT, Llama, etc.) is descended from this architecture. Read this if you want to understand why the models you're fine-tuning work the way they do.
The LoRA paper. Introduces the trick of freezing the base model's weights and training tiny "adapter" matrices instead. This is exactly what mlx_lm.lora and HuggingFace PEFT do. Both the MLX and Liquid projects use this technique.
QLoRA extends LoRA to work on quantized (compressed) base models. When the MLX project fine-tunes a 4-bit quantized Qwen model, it's automatically using QLoRA under the hood. This paper explains why that works.
A recent survey of all the different parameter-efficient fine-tuning methods (LoRA, Adapters, Prefix Tuning, Prompt Tuning, etc.). Useful background if you want to know what alternatives exist beyond LoRA.
📘 Fine-Tuning Guides
Official documentation and tutorials from HuggingFace and Unsloth. Downloaded as HTML so they work offline.
A beginner-friendly walkthrough of full fine-tuning with HuggingFace Transformers. This was one of the starting points for the MLX and Liquid projects — even though our projects use LoRA (not full fine-tuning), the tutorial is great for understanding the HuggingFace workflow.
Reference for the SFTTrainer class (Supervised Fine-Tuning Trainer), which is what the Liquid notebook uses to actually run training. Explains all the SFTConfig options.
Critical read. Explains tokenizer.apply_chat_template(), the function both MLX and Liquid notebooks call before generating text. If you forget this step, the model receives raw text instead of the chat format it was trained on and produces garbage.
Unsloth is an alternative fine-tuning library that claims 2-5x faster training and uses less memory than vanilla TRL. Liquid AI's cookbook has both a TRL version and an Unsloth version of their example notebook. This is the landing page.
Step-by-step Unsloth fine-tuning walkthrough. A good alternative read if you want to compare the Unsloth workflow to the TRL workflow we used in the Liquid project.
Practical advice on choosing LoRA rank, alpha, dropout, target modules, and learning rate. Applies to both MLX and Liquid projects since they both use the same LoRA technique (just with different libraries).
🗂 Projects
Each project has its own docs/references/how-to.html with project-specific papers, guides, and quick-start commands:
scikit-learn spam classifier (Random Forest + Logistic Regression + SVM ensemble) with LIME, SHAP, and ELI5 explainability. Deployed via Gradio + HuggingFace Spaces.
📚 Citing These Sources
Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention Is All You Need.
In Advances in Neural Information Processing Systems 30 (NeurIPS 2017).
https://arxiv.org/abs/1706.03762
Hu, E., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., & Chen, W. (2021).
LoRA: Low-Rank Adaptation of Large Language Models. arXiv:2106.09685.
Dettmers, T., Pagnoni, A., Holtzman, A., & Zettlemoyer, L. (2023).
QLoRA: Efficient Finetuning of Quantized LLMs. NeurIPS 2023. arXiv:2305.14314.
Han, Z., Gao, C., Liu, J., Zhang, J., & Zhang, S.Q. (2024).
Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Survey.
arXiv:2403.14608.