Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
unsloth
trl
sft
text-generation-inference
Instructions to use Thunderbolts123/UltraThinker-Coder-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thunderbolts123/UltraThinker-Coder-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thunderbolts123/UltraThinker-Coder-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Thunderbolts123/UltraThinker-Coder-3B") model = AutoModelForMultimodalLM.from_pretrained("Thunderbolts123/UltraThinker-Coder-3B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Thunderbolts123/UltraThinker-Coder-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thunderbolts123/UltraThinker-Coder-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thunderbolts123/UltraThinker-Coder-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Thunderbolts123/UltraThinker-Coder-3B
- SGLang
How to use Thunderbolts123/UltraThinker-Coder-3B 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 "Thunderbolts123/UltraThinker-Coder-3B" \ --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": "Thunderbolts123/UltraThinker-Coder-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Thunderbolts123/UltraThinker-Coder-3B" \ --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": "Thunderbolts123/UltraThinker-Coder-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use Thunderbolts123/UltraThinker-Coder-3B 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 Thunderbolts123/UltraThinker-Coder-3B 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 Thunderbolts123/UltraThinker-Coder-3B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Thunderbolts123/UltraThinker-Coder-3B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Thunderbolts123/UltraThinker-Coder-3B", max_seq_length=2048, ) - Docker Model Runner
How to use Thunderbolts123/UltraThinker-Coder-3B with Docker Model Runner:
docker model run hf.co/Thunderbolts123/UltraThinker-Coder-3B
(Trained with Unsloth)
Browse files- config.json +71 -0
- generation_config.json +10 -0
- tokenizer_config.json +2 -2
config.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": null,
|
| 7 |
+
"torch_dtype": "float16",
|
| 8 |
+
"eos_token_id": 151645,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 2048,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 11008,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention"
|
| 50 |
+
],
|
| 51 |
+
"max_position_embeddings": 32768,
|
| 52 |
+
"max_window_layers": 36,
|
| 53 |
+
"model_type": "qwen2",
|
| 54 |
+
"num_attention_heads": 16,
|
| 55 |
+
"num_hidden_layers": 36,
|
| 56 |
+
"num_key_value_heads": 2,
|
| 57 |
+
"pad_token_id": 151665,
|
| 58 |
+
"rms_norm_eps": 1e-06,
|
| 59 |
+
"rope_parameters": {
|
| 60 |
+
"rope_theta": 1000000.0,
|
| 61 |
+
"rope_type": "default"
|
| 62 |
+
},
|
| 63 |
+
"sliding_window": null,
|
| 64 |
+
"tie_word_embeddings": true,
|
| 65 |
+
"unsloth_fixed": true,
|
| 66 |
+
"unsloth_version": "2026.5.9",
|
| 67 |
+
"use_cache": false,
|
| 68 |
+
"use_mrope": false,
|
| 69 |
+
"use_sliding_window": false,
|
| 70 |
+
"vocab_size": 151936
|
| 71 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eos_token_id": [
|
| 3 |
+
151645,
|
| 4 |
+
151643
|
| 5 |
+
],
|
| 6 |
+
"max_length": 32768,
|
| 7 |
+
"max_new_tokens": 2048,
|
| 8 |
+
"pad_token_id": 151665,
|
| 9 |
+
"transformers_version": "5.5.0"
|
| 10 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
"is_local": false,
|
| 10 |
"model_max_length": 32768,
|
| 11 |
"pad_token": "<|PAD_TOKEN|>",
|
| 12 |
-
"padding_side": "
|
| 13 |
"split_special_tokens": false,
|
| 14 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 15 |
"unk_token": null,
|
|
@@ -199,4 +199,4 @@
|
|
| 199 |
"special": true
|
| 200 |
}
|
| 201 |
}
|
| 202 |
-
}
|
|
|
|
| 9 |
"is_local": false,
|
| 10 |
"model_max_length": 32768,
|
| 11 |
"pad_token": "<|PAD_TOKEN|>",
|
| 12 |
+
"padding_side": "left",
|
| 13 |
"split_special_tokens": false,
|
| 14 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 15 |
"unk_token": null,
|
|
|
|
| 199 |
"special": true
|
| 200 |
}
|
| 201 |
}
|
| 202 |
+
}
|