Text Generation
Transformers
Safetensors
qwen3_5_moe
image-text-to-text
conversational
8-bit precision
modelopt
Instructions to use ornith-ai/Ornith-1.5-397B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ornith-ai/Ornith-1.5-397B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ornith-ai/Ornith-1.5-397B-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ornith-ai/Ornith-1.5-397B-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("ornith-ai/Ornith-1.5-397B-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ornith-ai/Ornith-1.5-397B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ornith-ai/Ornith-1.5-397B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ornith-ai/Ornith-1.5-397B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ornith-ai/Ornith-1.5-397B-NVFP4
- SGLang
How to use ornith-ai/Ornith-1.5-397B-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 "ornith-ai/Ornith-1.5-397B-NVFP4" \ --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": "ornith-ai/Ornith-1.5-397B-NVFP4", "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 "ornith-ai/Ornith-1.5-397B-NVFP4" \ --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": "ornith-ai/Ornith-1.5-397B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ornith-ai/Ornith-1.5-397B-NVFP4 with Docker Model Runner:
docker model run hf.co/ornith-ai/Ornith-1.5-397B-NVFP4
Can 2x PRO 6000 handle it?
#2
by shsky - opened
Can 2x PRO 6000 handle it?
I had to place 17 experts (each about 3.5GB) on my 4x 3090s to have space for 1M context and mmproj. I had good performance somehow with this placement around 40-50 tok/s. This placement probably isn't the optimal, but a starting point.
LLAMA_CPP_SERVER_ARGS="-m /mnt/models/Ornith-1.5-397B-NVFP4/Ornith-1.5-397B-NVFP4-nomtp.gguf -mm /mnt/models/Ornith-1.5-397B-NVFP4/mmproj-Ornith-1.5-397B-BF16.gguf --alias ornith15-nvfp4 --host 127.0.0.1 --port 30014 --device CUDA0,CUDA1,CUDA2,CUDA3,CUDA4,CUDA5 -ngl all -sm layer -ts 1,1,0,0,0,0 --fit off -ot blk\.(0|36|42|54)\.ffn_.*_exps.*=CUDA2,blk\.(3|12|21|33)\.ffn_.*_exps.*=CUDA3,blk\.(6|15|24|39|45)\.ffn_.*_exps.*=CUDA4,blk\.(9|18|51|57)\.ffn_.*_exps.*=CUDA5 -c 1048576 -ctk q8_0 -ctv q8_0 -fa on --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 262144 -b 2048 -ub 512 -t 8 -tb 32 --parallel 4 --kv-unified -cram 0 --no-cache-idle-slots --temp 1.0 --top-p 0.95 --top-k 20 --jinja"
CUDA0, CUDA1 are the RTX Pro 6000
CUDA2,CUDA3,CUDA4,CUDA5 are RTX 3090s
Fitting the 17 experts on only 3x3090 also worked btw.
6,6,5 split
--device CUDA0,CUDA1,CUDA2,CUDA3,CUDA4
-ot blk\.(0|9|18|36|45|54)\.ffn_.*_exps.*=CUDA2,blk\.(3|12|21|33|42|51)\.ffn_.*_exps.*=CUDA3,blk\.(6|15|24|39|48)\.ffn_.*_exps.*=CUDA4