How to use from
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 "onekq-ai/Bespoke-Stratos-32B-bnb-4bit" \
    --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": "onekq-ai/Bespoke-Stratos-32B-bnb-4bit",
		"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 "onekq-ai/Bespoke-Stratos-32B-bnb-4bit" \
        --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": "onekq-ai/Bespoke-Stratos-32B-bnb-4bit",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

Bitsandbytes quantization of https://huggingface.co/bespokelabs/Bespoke-Stratos-32B.

See https://huggingface.co/blog/4bit-transformers-bitsandbytes for instructions.

from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers import BitsAndBytesConfig
import torch

# Define the 4-bit configuration
nf4_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=torch.bfloat16
)

# Load the pre-trained model with the 4-bit quantization configuration
model = AutoModelForCausalLM.from_pretrained("bespokelabs/Bespoke-Stratos-32B", quantization_config=nf4_config)

# Load the tokenizer associated with the model
tokenizer = AutoTokenizer.from_pretrained("bespokelabs/Bespoke-Stratos-32B")

# Push the model and tokenizer to the Hugging Face hub
model.push_to_hub("onekq-ai/Bespoke-Stratos-32B-bnb-4bit", use_auth_token=True)
tokenizer.push_to_hub("onekq-ai/Bespoke-Stratos-32B-bnb-4bit", use_auth_token=True)
Downloads last month
3
Safetensors
Model size
34B params
Tensor type
F32
·
F16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for onekq-ai/Bespoke-Stratos-32B-bnb-4bit

Base model

Qwen/Qwen2.5-32B
Quantized
(6)
this model

Collection including onekq-ai/Bespoke-Stratos-32B-bnb-4bit