Instructions to use joyboy5656n/coding-assistant-llm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use joyboy5656n/coding-assistant-llm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="joyboy5656n/coding-assistant-llm") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("joyboy5656n/coding-assistant-llm") model = AutoModelForCausalLM.from_pretrained("joyboy5656n/coding-assistant-llm", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use joyboy5656n/coding-assistant-llm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "joyboy5656n/coding-assistant-llm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joyboy5656n/coding-assistant-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/joyboy5656n/coding-assistant-llm
- SGLang
How to use joyboy5656n/coding-assistant-llm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "joyboy5656n/coding-assistant-llm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joyboy5656n/coding-assistant-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "joyboy5656n/coding-assistant-llm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joyboy5656n/coding-assistant-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use joyboy5656n/coding-assistant-llm with Docker Model Runner:
docker model run hf.co/joyboy5656n/coding-assistant-llm
Coding Assistant (Fine-tuned Qwen2.5-1.5B-Instruct)
Model Description
This is a LoRA fine-tuned version of Qwen/Qwen2.5-1.5B-Instruct, specialized to answer Coding questions only. It was trained on a synthetic instruction dataset generated using the Groq API (Llama 3.3 70B as the data-generation model), and explicitly trained to politely decline questions outside the coding domain rather than answering them.
- Developed by: [Dhwanit Rawat / joyboy5656n]
- Model type: Causal decoder-only language model (LoRA fine-tune, merged into base weights)
- Language(s): English (code examples in Python/JavaScript/SQL)
- License: Apache 2.0
- Finetuned from model: Qwen/Qwen2.5-1.5B-Instruct
Uses
Direct Use
Answering programming-related questions: Python fundamentals, JavaScript basics, data structures, algorithms, debugging techniques, REST APIs, SQL basics, Git and version control, OOP concepts, web development basics, code optimization, unit testing, software design patterns, error handling, and recursion.
Out-of-Scope Use
This model is intentionally trained to refuse questions unrelated to coding (e.g. cooking, sports, medical advice, general trivia). It is not intended as a replacement for a full code assistant/IDE tool, production code review, or security auditing — it's a small (1.5B parameter) educational/demo model.
How to Get Started with the Model
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "your-hf-username/coding-assistant-llm"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
messages = [
{"role": "system", "content": "You are a specialized Coding assistant. You ONLY answer questions related to Coding. If a question is not about Coding, politely decline."},
{"role": "user", "content": "Explain the difference between a list and a tuple in Python."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
output = model.generate(inputs, max_new_tokens=300)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Training Details
Training Data
A synthetic dataset of instruction-response pairs generated via the Groq API, covering common programming topics, plus a set of refusal examples (~15% of the dataset) pairing off-domain questions with polite declines. Generated under a fixed daily API call budget to stay within Groq's free-tier limits.
Training Procedure
- Method: LoRA (Low-Rank Adaptation) fine-tuning, adapters merged into the base model after training
- Base model: Qwen2.5-1.5B-Instruct, loaded in 4-bit (NF4) for training
- LoRA config: r=16, alpha=32, dropout=0.05, applied to attention and MLP projection layers
- Epochs: 3
- Effective batch size: 16 (batch size 2 × gradient accumulation 8)
- Learning rate: 2e-4
- Training regime: fp16 mixed precision
Speeds, Sizes, Times
- Trained on a single Kaggle T4 GPU
- Dataset size:
450 examples (380 domain + ~70 refusal examples)
Evaluation
Manual qualitative evaluation was performed by prompting the model with in-domain coding questions and out-of-domain questions (e.g. sports, trivia) to verify it answers the former and declines the latter. No formal benchmark scores are reported.
Bias, Risks, and Limitations
- Trained on a small (~450 example) synthetic dataset, so coverage of advanced/niche programming topics is limited.
- Synthetic training data was generated by another LLM (Llama 3.3 70B via Groq), so any biases, inaccuracies, or outdated practices in that model's outputs may be inherited here.
- Code generated by this model should always be reviewed and tested before use — it is not guaranteed to be correct, secure, or production-ready.
Environmental Impact
- Hardware Type: NVIDIA T4 GPU (Kaggle free tier)
- Hours used: < 1 hour
- Cloud Provider: Kaggle
- Compute Region: Unknown
Technical Specifications
- Architecture: Qwen2 (Qwen2.5 reuses the Qwen2 architecture class), ~1.5B parameters
- Software: transformers, peft, bitsandbytes, datasets, accelerate
Model Card Authors
[Dhwanit Rawat / joyboy5656n]
Model Card Contact
- Downloads last month
- -