Text Generation
PEFT
Safetensors
English
gpt_oss
Generated from Trainer
personality
cosmic
gpt-oss
lora
unsloth
Mixture of Experts
conversational
custom_code
Instructions to use ToddLLM/xyrus-cosmic-gpt-oss-20b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ToddLLM/xyrus-cosmic-gpt-oss-20b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gpt-oss-20b-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "ToddLLM/xyrus-cosmic-gpt-oss-20b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use ToddLLM/xyrus-cosmic-gpt-oss-20b 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 ToddLLM/xyrus-cosmic-gpt-oss-20b 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 ToddLLM/xyrus-cosmic-gpt-oss-20b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ToddLLM/xyrus-cosmic-gpt-oss-20b to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ToddLLM/xyrus-cosmic-gpt-oss-20b", max_seq_length=2048, )
File size: 1,319 Bytes
dc37488 8351988 dc37488 de22057 dc37488 8351988 dc37488 8351988 dc37488 | 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 | {
"base_model": "unsloth/gpt-oss-20b-unsloth-bnb-4bit",
"model_type": "PEFT LoRA Adapter",
"library_name": "peft",
"peft_type": "LORA",
"task_type": "CAUSAL_LM",
"trainable_parameters": 7960000,
"total_parameters": 20900000000,
"training_hardware": "NVIDIA RTX 3090 24GB",
"training_time_hours": 1.78,
"training_framework": "unsloth",
"github_repo": "https://github.com/toddllm/fine-tune-gpt-oss",
"lora_config": {
"r": 16,
"lora_alpha": 32,
"target_modules": [
"q_proj",
"k_proj",
"v_proj",
"o_proj"
],
"lora_dropout": 0.1,
"bias": "none",
"task_type": "CAUSAL_LM"
},
"usage_example": {
"description": "Load this LoRA adapter with PEFT",
"code": [
"from peft import PeftModel, PeftConfig",
"from transformers import AutoModelForCausalLM, AutoTokenizer",
"",
"# Load base model in 4-bit",
"base_model = AutoModelForCausalLM.from_pretrained(",
" 'unsloth/gpt-oss-20b-unsloth-bnb-4bit',",
" load_in_4bit=True,",
" device_map='auto'",
")",
"",
"# Load LoRA adapter",
"model = PeftModel.from_pretrained(base_model, 'ToddLLM/xyrus-cosmic-gpt-oss-20b')",
"tokenizer = AutoTokenizer.from_pretrained('unsloth/gpt-oss-20b-unsloth-bnb-4bit')"
]
}
} |