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.
- 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 Desktop
- 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 @earendil-works/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
- 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
- Hermes Agent
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
- OpenClaw
How to use AviralGusain/unity-debug-coach with OpenClaw:
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 OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "AviralGusain/unity-debug-coach:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit
|
| 6 |
+
tags:
|
| 7 |
+
- fine-tuned
|
| 8 |
+
- unity
|
| 9 |
+
- game-development
|
| 10 |
+
- csharp
|
| 11 |
+
- debugging
|
| 12 |
+
- qlora
|
| 13 |
+
- lora
|
| 14 |
+
- unsloth
|
| 15 |
+
- gguf
|
| 16 |
+
datasets: []
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Unity C# Debugging Coach
|
| 21 |
+
|
| 22 |
+
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.
|
| 23 |
+
|
| 24 |
+
## What this model does
|
| 25 |
+
|
| 26 |
+
When given a Unity or C# debugging question, the model responds consistently in this structure:
|
| 27 |
+
|
| 28 |
+
1. **Problem** — briefly identifies what is likely wrong
|
| 29 |
+
2. **Why it happens** — explains the root cause in beginner-friendly language
|
| 30 |
+
3. **How to fix it** — provides a concrete, actionable solution (often with corrected code)
|
| 31 |
+
4. **Prevention tip** — gives a best-practice note to avoid the issue in future projects
|
| 32 |
+
|
| 33 |
+
The model stays encouraging and practical, avoiding overly academic explanations.
|
| 34 |
+
|
| 35 |
+
## Example usage
|
| 36 |
+
|
| 37 |
+
**System prompt (recommended):**
|
| 38 |
+
```
|
| 39 |
+
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.
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
**Example input:**
|
| 43 |
+
```
|
| 44 |
+
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.
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
**Example output:**
|
| 48 |
+
```
|
| 49 |
+
Problem:
|
| 50 |
+
Your player is passing through the floor at runtime despite having the correct collider setup.
|
| 51 |
+
|
| 52 |
+
Why it happens:
|
| 53 |
+
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.
|
| 54 |
+
|
| 55 |
+
How to fix it:
|
| 56 |
+
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.
|
| 57 |
+
|
| 58 |
+
Also verify:
|
| 59 |
+
- Both colliders are active and not set as triggers
|
| 60 |
+
- The ground layer is not excluded in the Physics 2D settings
|
| 61 |
+
|
| 62 |
+
Prevention tip:
|
| 63 |
+
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.
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Training details
|
| 67 |
+
|
| 68 |
+
| Detail | Value |
|
| 69 |
+
|---|---|
|
| 70 |
+
| Base model | `unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit` |
|
| 71 |
+
| Fine-tuning method | QLoRA (LoRA r=16, alpha=32) |
|
| 72 |
+
| Training examples | 600 |
|
| 73 |
+
| Validation examples | 120 |
|
| 74 |
+
| Epochs | 3 |
|
| 75 |
+
| Max sequence length | 2048 tokens |
|
| 76 |
+
| Learning rate | 2e-4 (cosine schedule) |
|
| 77 |
+
| Batch size | 2 (grad accum 4, effective 8) |
|
| 78 |
+
| Hardware | Colab A100 |
|
| 79 |
+
| Framework | Unsloth + TRL SFTTrainer |
|
| 80 |
+
|
| 81 |
+
## Dataset
|
| 82 |
+
|
| 83 |
+
The training data was synthetically generated using GPT-5.2-chat via OpenRouter. Each example is a conversation pair where:
|
| 84 |
+
|
| 85 |
+
- **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).
|
| 86 |
+
- **Assistant message:** A structured response following the four-part format described above.
|
| 87 |
+
|
| 88 |
+
## GGUF / LM Studio
|
| 89 |
+
|
| 90 |
+
A Q4_K_M quantized GGUF is available in this repository for use in LM Studio, Ollama, or any llama.cpp-compatible runtime.
|
| 91 |
+
|
| 92 |
+
To use in LM Studio: search for this repository by username in the model search.
|
| 93 |
+
|
| 94 |
+
## Known limitations
|
| 95 |
+
|
| 96 |
+
- 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.
|
| 97 |
+
- Coverage of very advanced Unity topics (custom render pipelines, DOTS/ECS, compute shaders) is limited — the training data focused on beginner/intermediate issues.
|
| 98 |
+
- 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.
|
| 99 |
+
- Response quality may degrade on queries that mix multiple unrelated bugs in one message.
|