Instructions to use dtadpole/KernelCoder-4B_20250621-071556 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dtadpole/KernelCoder-4B_20250621-071556 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen3-4b-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "dtadpole/KernelCoder-4B_20250621-071556") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use dtadpole/KernelCoder-4B_20250621-071556 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 dtadpole/KernelCoder-4B_20250621-071556 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 dtadpole/KernelCoder-4B_20250621-071556 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dtadpole/KernelCoder-4B_20250621-071556 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="dtadpole/KernelCoder-4B_20250621-071556", max_seq_length=2048, )
dtadpole/KernelCoder-4B_20250621-071556
This model is a fine-tuned version of Qwen/Qwen3-4B using Unsloth and LoRA.
Model Details
- Base Model: Qwen/Qwen3-4B
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Max Sequence Length: 16384
- Training Examples: 330
- LoRA Rank: 64
- LoRA Alpha: 64
Training Configuration
- Epochs: 2
- Learning Rate: 5e-05
- Batch Size: 1
- Gradient Accumulation Steps: 1
Usage
from unsloth import FastLanguageModel
import torch
# Load model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="dtadpole/KernelCoder-4B_20250621-071556",
max_seq_length=16384,
dtype=None,
load_in_4bit=True,
)
# Enable inference mode
FastLanguageModel.for_inference(model)
# Format your prompt
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Your question here"}
]
formatted_prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
# Generate
inputs = tokenizer(formatted_prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Training Data
This model was fine-tuned on processed conversation experiences for improved performance on specific tasks.
Limitations
- This is a LoRA adapter that requires the base model to function
- Performance may vary depending on the specific use case
- The model inherits any limitations from the base model
Framework Versions
- Unsloth: 2025.6.1
- Transformers: 4.52.4
- PyTorch: 2.7.0
- PEFT: Latest
- Downloads last month
- 1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support