Instructions to use rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-20b") model = PeftModel.from_pretrained(base_model, "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872") - Transformers
How to use rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872") model = AutoModelForCausalLM.from_pretrained("rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872") 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 rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872
- SGLang
How to use rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 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 "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872" \ --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": "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872", "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 "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872" \ --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": "rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872 with Docker Model Runner:
docker model run hf.co/rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872
See axolotl config
axolotl version: 0.12.0
adapter: lora
attn_implementation: eager
base_model: openai/gpt-oss-20b
bf16: true
chat_template: llama3
cosine_min_lr_ratio: 0.3
dataloader_num_workers: 12
dataset_prepared_path: null
datasets:
- data_files:
- 81d99e01-29b1-4f69-a23e-0dba6a297872_train_data.json
ds_type: json
format: custom
path: /workspace/axolotl/data
type:
field_instruction: instruct
field_output: output
format: '{instruction}'
no_input_format: '{instruction}'
system_format: '{system}'
system_prompt: ''
ddp: true
debug: null
deepspeed: null
device_map: cuda
early_stopping_patience: null
eval_max_new_tokens: 128
eval_steps: null
eval_table_size: null
evals_per_epoch: null
flash_attention: true
fp16: false
fsdp: null
fsdp_config: null
gradient_accumulation_steps: 1
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
group_by_length: true
hub_model_id: null
hub_private_repo: false
hub_repo: null
hub_strategy: checkpoint
hub_token: null
learning_rate: 0.0002
liger_fused_linear_cross_entropy: true
liger_glu_activation: true
liger_layer_norm: true
liger_rms_norm: true
liger_rope: true
load_in_4bit: false
load_in_8bit: false
local_rank: null
logging_steps: null
lora_alpha: 64
lora_dropout: 0.05
lora_fan_in_fan_out: null
lora_model_dir: null
lora_r: 32
lora_target_linear: true
loraplus_lr_embedding: 1.0e-06
loraplus_lr_ratio: 16
lr_scheduler: cosine
max_grad_norm: 1
max_steps: 4257
micro_batch_size: 12
mlflow_experiment_name: /workspace/axolotl/data/81d99e01-29b1-4f69-a23e-0dba6a297872_train_data.json
model_card: false
model_type: AutoModelForCausalLM
num_epochs: 200
optimizer: adamw_bnb_8bit
output_dir: /app/checkpoints/81d99e01-29b1-4f69-a23e-0dba6a297872/de7fae79-1bd5-4ce4-b6fa-0e39b70b101f
pad_to_sequence_len: true
plugins:
- axolotl.integrations.liger.LigerPlugin
push_every_save: true
push_to_hub: true
resume_from_checkpoint: null
rl: null
s2_attention: null
sample_packing: true
save_steps: 100
save_strategy: steps
save_total_limit: 1
saves_per_epoch: 0
sequence_len: 512
strict: false
tf32: true
tokenizer_type: AutoTokenizer
train_on_inputs: false
trl: null
trust_remote_code: false
use_flash_attention: false
use_liger: true
val_set_size: 0.0
wandb_mode: offline
wandb_name: 81d99e01-29b1-4f69-a23e-0dba6a297872_de7fae79-1bd5-4ce4-b6fa-0e39b70b101f
wandb_project: Gradients-On-Demand
wandb_run: null
wandb_runid: 81d99e01-29b1-4f69-a23e-0dba6a297872_de7fae79-1bd5-4ce4-b6fa-0e39b70b101f
warmup_steps: 200
weight_decay: 0
xformers_attention: null
app/checkpoints/81d99e01-29b1-4f69-a23e-0dba6a297872/de7fae79-1bd5-4ce4-b6fa-0e39b70b101f
This model was trained from scratch on the None dataset.
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 12
- eval_batch_size: 12
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_BNB with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 200
- training_steps: 4257
Training results
Framework versions
- PEFT 0.17.0
- Transformers 4.55.0
- Pytorch 2.7.1+cu128
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 175
Model tree for rayonlabs/gpt-oss-20b-custom-81d99e01-29b1-4f69-a23e-0dba6a297872
Base model
openai/gpt-oss-20b