Text Generation
Transformers
Safetensors
English
gpt_oss
text-generation-inference
unsloth
conversational
Instructions to use Azmainadeeb/gpt-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Azmainadeeb/gpt-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Azmainadeeb/gpt-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Azmainadeeb/gpt-sft") model = AutoModelForCausalLM.from_pretrained("Azmainadeeb/gpt-sft") 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
- vLLM
How to use Azmainadeeb/gpt-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Azmainadeeb/gpt-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azmainadeeb/gpt-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Azmainadeeb/gpt-sft
- SGLang
How to use Azmainadeeb/gpt-sft 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 "Azmainadeeb/gpt-sft" \ --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": "Azmainadeeb/gpt-sft", "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 "Azmainadeeb/gpt-sft" \ --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": "Azmainadeeb/gpt-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Azmainadeeb/gpt-sft 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 Azmainadeeb/gpt-sft 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 Azmainadeeb/gpt-sft to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Azmainadeeb/gpt-sft to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Azmainadeeb/gpt-sft", max_seq_length=2048, ) - Docker Model Runner
How to use Azmainadeeb/gpt-sft with Docker Model Runner:
docker model run hf.co/Azmainadeeb/gpt-sft
(Trained with Unsloth)
Browse files- config.json +82 -0
- tokenizer_config.json +3 -2
config.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"GptOssForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 199998,
|
| 8 |
+
"torch_dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 200002,
|
| 10 |
+
"experts_per_token": 4,
|
| 11 |
+
"head_dim": 64,
|
| 12 |
+
"hidden_act": "silu",
|
| 13 |
+
"hidden_size": 2880,
|
| 14 |
+
"initial_context_length": 4096,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 2880,
|
| 17 |
+
"layer_types": [
|
| 18 |
+
"sliding_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"sliding_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"sliding_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"sliding_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"sliding_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"sliding_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"sliding_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"sliding_attention",
|
| 53 |
+
"full_attention"
|
| 54 |
+
],
|
| 55 |
+
"max_position_embeddings": 131072,
|
| 56 |
+
"model_type": "gpt_oss",
|
| 57 |
+
"num_attention_heads": 64,
|
| 58 |
+
"num_experts_per_tok": 4,
|
| 59 |
+
"num_hidden_layers": 36,
|
| 60 |
+
"num_key_value_heads": 8,
|
| 61 |
+
"num_local_experts": 128,
|
| 62 |
+
"output_router_logits": false,
|
| 63 |
+
"pad_token_id": 200017,
|
| 64 |
+
"rms_norm_eps": 1e-05,
|
| 65 |
+
"rope_scaling": {
|
| 66 |
+
"beta_fast": 32.0,
|
| 67 |
+
"beta_slow": 1.0,
|
| 68 |
+
"factor": 32.0,
|
| 69 |
+
"original_max_position_embeddings": 4096,
|
| 70 |
+
"rope_type": "yarn",
|
| 71 |
+
"truncate": false
|
| 72 |
+
},
|
| 73 |
+
"rope_theta": 150000,
|
| 74 |
+
"router_aux_loss_coef": 0.9,
|
| 75 |
+
"sliding_window": 128,
|
| 76 |
+
"swiglu_limit": 7.0,
|
| 77 |
+
"tie_word_embeddings": false,
|
| 78 |
+
"unsloth_fixed": true,
|
| 79 |
+
"unsloth_version": "2026.1.4",
|
| 80 |
+
"use_cache": true,
|
| 81 |
+
"vocab_size": 201088
|
| 82 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -181,5 +181,6 @@
|
|
| 181 |
"pad_token": "<|reserved_200017|>",
|
| 182 |
"padding_side": "left",
|
| 183 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 184 |
-
"unk_token": null
|
| 185 |
-
}
|
|
|
|
|
|
| 181 |
"pad_token": "<|reserved_200017|>",
|
| 182 |
"padding_side": "left",
|
| 183 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 184 |
+
"unk_token": null,
|
| 185 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}<|start|>system<|message|># Instructions\n\n{{ message['content'] }}<|end|>{% elif message['role'] == 'user' %}<|start|>user<|message|>{{ message['content'] }}<|end|>{% elif message['role'] == 'assistant' %}<|start|>assistant<|message|>{{ message['content'] }}<|return|>{% endif %}{% endfor %}"
|
| 186 |
+
}
|