Team Ai
Apppublic

nihardon/unit-test-generator

sourceHugging Faceopenrailupdated 9mo agoView on Hugging Face
1likes
App README

๐Ÿงช 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

  1. 1.Paste your Python function into the box.
  2. 2.Click Generate.
  3. 3.The model produces a complete, runnable pytest test 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