In this project I finetuned HuggingFace SLMs (Qwen 0.6B, Smollm2 135M) with Lora on 5k synthetically generated Rust Programming question-answer pairs. The model is paired with RAG (chromaDB, LangChain) to answer Rust-related questions using a Rust Programming textbook for grounding. It also contains a evaluation script that uses a Judge LLM (Qwen 4b model) to evaluate the finetuned model against baseline on rust_qa_500_bench.jsonl.
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt streamlit run app.py python eval/eval_script.py cs_rag_llm_lora_finetune.ipynb: LORA finetuning code using HuggingFace's PEFT and TRL libs and their models. Training was done through Google Colab, using an L4 GPU.
data_gen: folder with code for calling larger Qwen model from Openrouter to generate the syntehtic Rust q-a dataset (rust_qa_dataset_5k.jsonl)
eval: contains eval_script.py for evaluating the finetuned model on rust_qa_500_bench.jsonl using a Judge LLM (Qwen 4b model)
main.py: RAG implementation with ChromaDB and Langchain
app.py: Simple frontend for User q-a built with Streamlit
24 commits
Jupyter Notebook
87.2%
Python
12.8%
In this project I finetuned HuggingFace SLMs (Qwen 0.6B, Smollm2 135M) with Lora on 5k synthetically generated Rust Programming question-answer pairs. The model is paired with RAG (chromaDB, LangChain) to answer Rust-related questions using a Rust Programming textbook for grounding. It also contains a evaluation script that uses a Judge LLM (Qwen 4b model) to evaluate the finetuned model against baseline on rust_qa_500_bench.jsonl.
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt streamlit run app.py python eval/eval_script.py cs_rag_llm_lora_finetune.ipynb: LORA finetuning code using HuggingFace's PEFT and TRL libs and their models. Training was done through Google Colab, using an L4 GPU.
data_gen: folder with code for calling larger Qwen model from Openrouter to generate the syntehtic Rust q-a dataset (rust_qa_dataset_5k.jsonl)
eval: contains eval_script.py for evaluating the finetuned model on rust_qa_500_bench.jsonl using a Judge LLM (Qwen 4b model)
main.py: RAG implementation with ChromaDB and Langchain
app.py: Simple frontend for User q-a built with Streamlit
24 commits
Jupyter Notebook
87.2%
Python
12.8%