Text Generation
Safetensors
GGUF
English
qwen2
fine-tuned
unity
game-development
csharp
debugging
qlora
lora
unsloth
conversational
Instructions to use AviralGusain/unity-debug-coach with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AviralGusain/unity-debug-coach with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AviralGusain/unity-debug-coach", filename="unity-debug-coach-Q4_K_M-00001-of-00006.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AviralGusain/unity-debug-coach with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AviralGusain/unity-debug-coach:Q4_K_M # Run inference directly in the terminal: llama cli -hf AviralGusain/unity-debug-coach:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AviralGusain/unity-debug-coach:Q4_K_M # Run inference directly in the terminal: llama cli -hf AviralGusain/unity-debug-coach:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf AviralGusain/unity-debug-coach:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AviralGusain/unity-debug-coach:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf AviralGusain/unity-debug-coach:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AviralGusain/unity-debug-coach:Q4_K_M
Use Docker
docker model run hf.co/AviralGusain/unity-debug-coach:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AviralGusain/unity-debug-coach with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AviralGusain/unity-debug-coach" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AviralGusain/unity-debug-coach", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AviralGusain/unity-debug-coach:Q4_K_M
- Ollama
How to use AviralGusain/unity-debug-coach with Ollama:
ollama run hf.co/AviralGusain/unity-debug-coach:Q4_K_M
- Unsloth Studio
How to use AviralGusain/unity-debug-coach with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AviralGusain/unity-debug-coach to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AviralGusain/unity-debug-coach to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AviralGusain/unity-debug-coach to start chatting
- Pi
How to use AviralGusain/unity-debug-coach with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AviralGusain/unity-debug-coach:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AviralGusain/unity-debug-coach:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use AviralGusain/unity-debug-coach with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AviralGusain/unity-debug-coach:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default AviralGusain/unity-debug-coach:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use AviralGusain/unity-debug-coach with Docker Model Runner:
docker model run hf.co/AviralGusain/unity-debug-coach:Q4_K_M
- Lemonade
How to use AviralGusain/unity-debug-coach with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AviralGusain/unity-debug-coach:Q4_K_M
Run and chat with the model
lemonade run user.unity-debug-coach-Q4_K_M
List all available models
lemonade list
| language: | |
| - en | |
| license: apache-2.0 | |
| base_model: unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit | |
| tags: | |
| - fine-tuned | |
| - unity | |
| - game-development | |
| - csharp | |
| - debugging | |
| - qlora | |
| - lora | |
| - unsloth | |
| - gguf | |
| datasets: [] | |
| pipeline_tag: text-generation | |
| # Unity C# Debugging Coach | |
| A fine-tuned language model that acts as a patient debugging coach for beginner and intermediate Unity game developers. Given a Unity/C# bug description, error message, or broken code snippet, the model responds with a structured four-part explanation: identify the problem, explain why it happens, provide a concrete fix, and add a prevention tip. | |
| ## What this model does | |
| When given a Unity or C# debugging question, the model responds consistently in this structure: | |
| 1. **Problem** β briefly identifies what is likely wrong | |
| 2. **Why it happens** β explains the root cause in beginner-friendly language | |
| 3. **How to fix it** β provides a concrete, actionable solution (often with corrected code) | |
| 4. **Prevention tip** β gives a best-practice note to avoid the issue in future projects | |
| The model stays encouraging and practical, avoiding overly academic explanations. | |
| ## Example usage | |
| **System prompt (recommended):** | |
| ``` | |
| You are a Unity C# debugging coach. When a student describes a bug or error, respond in four parts: (1) identify the problem, (2) explain why it happens, (3) give a concrete fix, (4) add a prevention tip. Keep your tone encouraging and your explanations beginner-friendly. | |
| ``` | |
| **Example input:** | |
| ``` | |
| My player keeps falling through the floor in my 2D platformer. I have a Rigidbody2D and a BoxCollider2D on the player, and a BoxCollider2D on the ground. No errors in the console. | |
| ``` | |
| **Example output:** | |
| ``` | |
| Problem: | |
| Your player is passing through the floor at runtime despite having the correct collider setup. | |
| Why it happens: | |
| This is almost always a collision detection issue. By default, Unity uses Discrete collision detection, which checks for collisions at each physics step. If your player moves fast enough (especially during a fall), it can teleport past a thin collider between steps β a problem called tunneling. | |
| How to fix it: | |
| Select your player's Rigidbody2D in the Inspector and change Collision Detection from "Discrete" to "Continuous". This tells Unity to check for collisions continuously along the movement path, preventing tunneling. | |
| Also verify: | |
| - Both colliders are active and not set as triggers | |
| - The ground layer is not excluded in the Physics 2D settings | |
| Prevention tip: | |
| Always use Continuous collision detection for fast-moving objects like players and projectiles. Reserve Discrete for slow or stationary objects to keep performance costs low. | |
| ``` | |
| ## Training details | |
| | Detail | Value | | |
| |---|---| | |
| | Base model | `unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit` | | |
| | Fine-tuning method | QLoRA (LoRA r=16, alpha=32) | | |
| | Training examples | 600 | | |
| | Validation examples | 120 | | |
| | Epochs | 3 | | |
| | Max sequence length | 2048 tokens | | |
| | Learning rate | 2e-4 (cosine schedule) | | |
| | Batch size | 2 (grad accum 4, effective 8) | | |
| | Hardware | Colab A100 | | |
| | Framework | Unsloth + TRL SFTTrainer | | |
| ## Dataset | |
| The training data was synthetically generated using GPT-5.2-chat via OpenRouter. Each example is a conversation pair where: | |
| - **User message:** A Unity/C# debugging question β ranging from short error-only reports to multi-line code snippets. Questions vary across 20 issue categories (NullReferenceException, collision bugs, NavMesh issues, animation transitions, etc.), 11 project contexts (2D platformer, RPG, top-down shooter, etc.), and 3 difficulty levels (beginner, intermediate, advanced beginner). | |
| - **Assistant message:** A structured response following the four-part format described above. | |
| ## GGUF / LM Studio | |
| A Q4_K_M quantized GGUF is available in this repository for use in LM Studio, Ollama, or any llama.cpp-compatible runtime. | |
| To use in LM Studio: search for this repository by username in the model search. | |
| ## Known limitations | |
| - The model was trained on synthetic data only; it has not seen real student conversations. Responses are structured and reliable, but may occasionally feel slightly formal compared to human tutor replies. | |
| - Coverage of very advanced Unity topics (custom render pipelines, DOTS/ECS, compute shaders) is limited β the training data focused on beginner/intermediate issues. | |
| - The model does not have access to live Unity documentation. For up-to-date API details, cross-reference with the official Unity Manual. As the teacher noted, RAG over Unity docs would significantly improve accuracy for version-specific questions. | |
| - Response quality may degrade on queries that mix multiple unrelated bugs in one message. | |