Text Generation
Transformers
Safetensors
PEFT
lora
bigcodebench
gpt-oss
code
causal-lm
conversational
Instructions to use unlimitedbytes/gptoss-bigcodebench-20b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unlimitedbytes/gptoss-bigcodebench-20b-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unlimitedbytes/gptoss-bigcodebench-20b-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unlimitedbytes/gptoss-bigcodebench-20b-lora", dtype="auto") - PEFT
How to use unlimitedbytes/gptoss-bigcodebench-20b-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unlimitedbytes/gptoss-bigcodebench-20b-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unlimitedbytes/gptoss-bigcodebench-20b-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unlimitedbytes/gptoss-bigcodebench-20b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unlimitedbytes/gptoss-bigcodebench-20b-lora
- SGLang
How to use unlimitedbytes/gptoss-bigcodebench-20b-lora 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 "unlimitedbytes/gptoss-bigcodebench-20b-lora" \ --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": "unlimitedbytes/gptoss-bigcodebench-20b-lora", "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 "unlimitedbytes/gptoss-bigcodebench-20b-lora" \ --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": "unlimitedbytes/gptoss-bigcodebench-20b-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use unlimitedbytes/gptoss-bigcodebench-20b-lora with Docker Model Runner:
docker model run hf.co/unlimitedbytes/gptoss-bigcodebench-20b-lora
File size: 1,578 Bytes
0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 0a2552d 1951d49 | 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 55 56 57 58 59 60 61 62 | ---
license: apache-2.0
base_model: openai/gpt-oss-20b
library_name: transformers
pipeline_tag: text-generation
tags:
- peft
- lora
- bigcodebench
- gpt-oss
- code
- causal-lm
inference: false
---
# GPT-OSS-20B BigCodeBench LoRA Adapter
LoRA adapter weights fine-tuned from `openai/gpt-oss-20b` on BigCodeBench split `v0.1.4` (~1.1K samples).
## Training Summary
- Steps: 100
- Final train_loss: 0.7833267974853516
- Runtime (s): 3717.3139
- Samples/sec: 0.43
- Total FLOPs: 6.825417425085542e+16
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = 'openai/gpt-oss-20b'
adapter = 'unlimitedbytes/gptoss-bigcodebench-20b-lora'
model = AutoModelForCausalLM.from_pretrained(base, device_map='auto', torch_dtype='auto')
model = PeftModel.from_pretrained(model, adapter)
tokenizer = AutoTokenizer.from_pretrained(base)
messages = [
{'role': 'system', 'content': 'You are a helpful coding assistant.'},
{'role': 'user', 'content': 'Write a Python function to add two numbers.'}
]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors='pt').to(model.device)
out = model.generate(input_ids, max_new_tokens=128)
print(tokenizer.decode(out[0], skip_special_tokens=False))
```
Merge adapter:
```python
model = model.merge_and_unload()
model.save_pretrained('merged-model')
```
## Limitations
- 100 training steps only; not fully converged.
- Adapter only, no merged full weights.
- Outputs may include control tokens.
## License
Apache-2.0 (base) + dataset licenses.
|