Text Generation
Transformers
Safetensors
Thai
English
qwen3_moe
nvfp4
fp4
modelopt
quantized
vllm
thai
dgx-spark
agicafet
8-bit precision
Instructions to use NatdhanaiPython/ThaiLLM-30B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NatdhanaiPython/ThaiLLM-30B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NatdhanaiPython/ThaiLLM-30B-NVFP4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NatdhanaiPython/ThaiLLM-30B-NVFP4") model = AutoModelForCausalLM.from_pretrained("NatdhanaiPython/ThaiLLM-30B-NVFP4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NatdhanaiPython/ThaiLLM-30B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NatdhanaiPython/ThaiLLM-30B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NatdhanaiPython/ThaiLLM-30B-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NatdhanaiPython/ThaiLLM-30B-NVFP4
- SGLang
How to use NatdhanaiPython/ThaiLLM-30B-NVFP4 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 "NatdhanaiPython/ThaiLLM-30B-NVFP4" \ --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": "NatdhanaiPython/ThaiLLM-30B-NVFP4", "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 "NatdhanaiPython/ThaiLLM-30B-NVFP4" \ --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": "NatdhanaiPython/ThaiLLM-30B-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NatdhanaiPython/ThaiLLM-30B-NVFP4 with Docker Model Runner:
docker model run hf.co/NatdhanaiPython/ThaiLLM-30B-NVFP4
| { | |
| "producer": { | |
| "name": "modelopt", | |
| "version": "0.43.0" | |
| }, | |
| "quantization": { | |
| "quant_algo": "NVFP4", | |
| "kv_cache_quant_algo": null, | |
| "group_size": 16, | |
| "exclude_modules": [ | |
| "lm_head", | |
| "model.layers.0.mlp.gate", | |
| "model.layers.1.mlp.gate", | |
| "model.layers.10.mlp.gate", | |
| "model.layers.11.mlp.gate", | |
| "model.layers.12.mlp.gate", | |
| "model.layers.13.mlp.gate", | |
| "model.layers.14.mlp.gate", | |
| "model.layers.15.mlp.gate", | |
| "model.layers.16.mlp.gate", | |
| "model.layers.17.mlp.gate", | |
| "model.layers.18.mlp.gate", | |
| "model.layers.19.mlp.gate", | |
| "model.layers.2.mlp.gate", | |
| "model.layers.20.mlp.gate", | |
| "model.layers.21.mlp.gate", | |
| "model.layers.22.mlp.gate", | |
| "model.layers.23.mlp.gate", | |
| "model.layers.24.mlp.gate", | |
| "model.layers.25.mlp.gate", | |
| "model.layers.26.mlp.gate", | |
| "model.layers.27.mlp.gate", | |
| "model.layers.28.mlp.gate", | |
| "model.layers.29.mlp.gate", | |
| "model.layers.3.mlp.gate", | |
| "model.layers.30.mlp.gate", | |
| "model.layers.31.mlp.gate", | |
| "model.layers.32.mlp.gate", | |
| "model.layers.33.mlp.gate", | |
| "model.layers.34.mlp.gate", | |
| "model.layers.35.mlp.gate", | |
| "model.layers.36.mlp.gate", | |
| "model.layers.37.mlp.gate", | |
| "model.layers.38.mlp.gate", | |
| "model.layers.39.mlp.gate", | |
| "model.layers.4.mlp.gate", | |
| "model.layers.40.mlp.gate", | |
| "model.layers.41.mlp.gate", | |
| "model.layers.42.mlp.gate", | |
| "model.layers.43.mlp.gate", | |
| "model.layers.44.mlp.gate", | |
| "model.layers.45.mlp.gate", | |
| "model.layers.46.mlp.gate", | |
| "model.layers.47.mlp.gate", | |
| "model.layers.5.mlp.gate", | |
| "model.layers.6.mlp.gate", | |
| "model.layers.7.mlp.gate", | |
| "model.layers.8.mlp.gate", | |
| "model.layers.9.mlp.gate" | |
| ] | |
| } | |
| } |