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
| { | |
| "architectures": [ | |
| "Qwen3MoeForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "decoder_sparse_step": 1, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151643, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6144, | |
| "max_position_embeddings": 32768, | |
| "max_window_layers": 48, | |
| "mlp_only_layers": [], | |
| "model_type": "qwen3_moe", | |
| "moe_intermediate_size": 768, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 32, | |
| "num_experts": 128, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 48, | |
| "num_key_value_heads": 4, | |
| "output_router_logits": false, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000.0, | |
| "router_aux_loss_coef": 0.001, | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.6", | |
| "use_cache": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936, | |
| "quantization_config": { | |
| "config_groups": { | |
| "group_0": { | |
| "input_activations": { | |
| "dynamic": false, | |
| "num_bits": 4, | |
| "type": "float", | |
| "group_size": 16 | |
| }, | |
| "weights": { | |
| "dynamic": false, | |
| "num_bits": 4, | |
| "type": "float", | |
| "group_size": 16 | |
| }, | |
| "targets": [ | |
| "Linear" | |
| ] | |
| } | |
| }, | |
| "ignore": [ | |
| "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" | |
| ], | |
| "quant_algo": "NVFP4", | |
| "producer": { | |
| "name": "modelopt", | |
| "version": "0.43.0" | |
| }, | |
| "quant_method": "modelopt" | |
| } | |
| } |