Instructions to use deburky/gpt-oss-claude-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deburky/gpt-oss-claude-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deburky/gpt-oss-claude-code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deburky/gpt-oss-claude-code") model = AutoModelForCausalLM.from_pretrained("deburky/gpt-oss-claude-code") 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
- vLLM
How to use deburky/gpt-oss-claude-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deburky/gpt-oss-claude-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deburky/gpt-oss-claude-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deburky/gpt-oss-claude-code
- SGLang
How to use deburky/gpt-oss-claude-code 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 "deburky/gpt-oss-claude-code" \ --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": "deburky/gpt-oss-claude-code", "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 "deburky/gpt-oss-claude-code" \ --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": "deburky/gpt-oss-claude-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deburky/gpt-oss-claude-code with Docker Model Runner:
docker model run hf.co/deburky/gpt-oss-claude-code
File size: 1,562 Bytes
930266b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
base_model: openai/gpt-oss-20b
library_name: transformers
tags:
- lora
- sft
- tool-use
- gpt-oss
license: apache-2.0
---
# gpt-oss-claude-code
Fine-tuned [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b) for tool-use and agentic coding tasks. LoRA adapters merged into base weights.
## Quick start
```python
import re, torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"deburky/gpt-oss-claude-code",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("deburky/gpt-oss-claude-code")
messages = [{"role": "user", "content": "Who is Alan Turing?"}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True,
return_tensors="pt", return_dict=True,
).to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=256)
response = tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:])
if "<|channel|>final<|message|>" in response:
response = response.split("<|channel|>final<|message|>")[-1]
print(re.sub(r"<\\|[^>]+\\|>", "", response).strip())
```
## Apple Silicon (MLX)
A fused MLX version is available at [`deburky/gpt-oss-claude-mlx`](https://huggingface.co/deburky/gpt-oss-claude-mlx).
## Training
- **Data:** ~280 tool-use conversation examples in gpt-oss harmony format
- **Method:** LoRA (rank 8, alpha 16) on attention + MoE expert layers, merged after training
- **LR:** 1e-4, cosine schedule
- **Final val loss:** ~0.48
- **Hardware:** Google Colab
|