nihardon/unit-test-generator
1
๐งช AI Unit Test Generator
A Fine-Tuned Llama-3 Model for Automated QA
This application uses a custom fine-tuned version of Meta's Llama-3-8B to automatically generate pytest unit tests for Python functions.
๐ How it Works
- Paste your Python function into the box.
- Click Generate.
- The model produces a complete, runnable
pytesttest case.
โ๏ธ Technical Architecture
To run a robust LLM on the free CPU tier, this project uses a split-architecture approach:
- Model: Llama-3-8B fine-tuned on the Alpaca-Python-18k dataset.
- Quantization: The model weights were converted to GGUF (Q4_K_M) format to reduce RAM usage from 16GB to ~5GB.
- Inference: Running locally on CPU using
llama-cpp-python. - Weights: Hosted separately in the Model Repository.
Built by [Nihar Donthireddy](https://www.linkedin.com/in/nihar-donthireddy-048b96277/) Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
