HuggingFaceH4/Multilingual-Thinking
Viewer • Updated • 1k • 9.71k • 116
How to use prxshetty/gpt-oss-20b-multilingual-thinking with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="prxshetty/gpt-oss-20b-multilingual-thinking") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("prxshetty/gpt-oss-20b-multilingual-thinking", dtype="auto")How to use prxshetty/gpt-oss-20b-multilingual-thinking with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "prxshetty/gpt-oss-20b-multilingual-thinking"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gpt-oss-20b-multilingual-thinking",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/prxshetty/gpt-oss-20b-multilingual-thinking
How to use prxshetty/gpt-oss-20b-multilingual-thinking with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "prxshetty/gpt-oss-20b-multilingual-thinking" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gpt-oss-20b-multilingual-thinking",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "prxshetty/gpt-oss-20b-multilingual-thinking" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gpt-oss-20b-multilingual-thinking",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use prxshetty/gpt-oss-20b-multilingual-thinking with Unsloth Studio:
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 prxshetty/gpt-oss-20b-multilingual-thinking to start chatting
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 prxshetty/gpt-oss-20b-multilingual-thinking to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for prxshetty/gpt-oss-20b-multilingual-thinking to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="prxshetty/gpt-oss-20b-multilingual-thinking",
max_seq_length=2048,
)How to use prxshetty/gpt-oss-20b-multilingual-thinking with Docker Model Runner:
docker model run hf.co/prxshetty/gpt-oss-20b-multilingual-thinking
A fine-tuned gpt-oss-20b model optimized for efficient text generation, multilingual conversational tasks, and instruction-following.
| Item | Details |
|---|---|
| Base checkpoint | unsloth/gpt-oss-20b |
| Fine-tune method | LoRA (PEFT) with Unsloth |
| Training run | 30 steps • Multilingual-Thinking dataset |
| Trainable params | [To be calculated, if available] |
| Loss | [Loss metrics unavailable] |
| Hardware | [Hardware details unavailable] |
| License | MIT License (Base model: Refer to gpt-oss-20b license) |
| Intended use | Educational, research, and chat-based applications |
| Dataset | Size | Focus |
|---|---|---|
HuggingFaceH4/Multilingual-Thinking |
[Size unavailable] | Multilingual reasoning and conversational tasks |
The dataset was wrapped with the chat template before training.
To use this model, install the required dependencies:
pip install torch>=2.8.0 triton>=3.4.0 transformers>=4.55.3 bitsandbytes unsloth
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/gpt-oss-20b",
max_seq_length=1024,
dtype=torch.float16,
load_in_4bit=True,
)
model = FastLanguageModel.get_peft_model(
model,
r=8,
target_modules=["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"],
lora_alpha=16,
lora_dropout=0,
bias="none",
use_gradient_checkpointing="unsloth",
)
from transformers import TextStreamer
messages = [
{"role": "user", "content": "Solve x^5 + 3x^4 - 10 = 3."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, streamer=TextStreamer(tokenizer))