Instructions to use InfiX-ai/InfiX-V1-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InfiX-ai/InfiX-V1-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="InfiX-ai/InfiX-V1-base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("InfiX-ai/InfiX-V1-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use InfiX-ai/InfiX-V1-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "InfiX-ai/InfiX-V1-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InfiX-ai/InfiX-V1-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/InfiX-ai/InfiX-V1-base
- SGLang
How to use InfiX-ai/InfiX-V1-base 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 "InfiX-ai/InfiX-V1-base" \ --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": "InfiX-ai/InfiX-V1-base", "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 "InfiX-ai/InfiX-V1-base" \ --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": "InfiX-ai/InfiX-V1-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use InfiX-ai/InfiX-V1-base with Docker Model Runner:
docker model run hf.co/InfiX-ai/InfiX-V1-base
Download config.json from InfiX-ai/InfiX-V1-base: direct link, hf CLI and curl.
- Browser
- Download file 3.19 kB
-
https://huggingface.co/InfiX-ai/InfiX-V1-base/resolve/main/config.json
- Command line
-
hf download hf://InfiX-ai/InfiX-V1-base/config.json
-
curl -L -o config.json https://huggingface.co/InfiX-ai/InfiX-V1-base/resolve/main/config.json
3.19 kB
| { | |
| "architectures": [ | |
| "InfixV1ForCausalLM" | |
| ], | |
| "model_type": "infix_v1", | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.50.0", | |
| "hidden_size": 4096, | |
| "intermediate_size": 15488, | |
| "num_attention_heads": 64, | |
| "num_key_value_heads": 4, | |
| "swa_num_attention_heads": 80, | |
| "swa_num_key_value_heads": 8, | |
| "swa_head_dim": 192, | |
| "swa_v_head_dim": 128, | |
| "partial_rotary_factor": 0.5, | |
| "swa_partial_rotary_factor": 0.334, | |
| "v_head_dim": 128, | |
| "num_hidden_layers": 42, | |
| "max_position_embeddings": 262144, | |
| "vocab_size": 129280, | |
| "head_dim": 128, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 10000000.0, | |
| "swa_rope_theta": 50000.0, | |
| "n_routed_experts": 288, | |
| "num_experts_per_tok": 13, | |
| "moe_intermediate_size": 1408, | |
| "shared_expert_intermediate_size": 1408, | |
| "first_k_dense_replace": 1, | |
| "norm_topk_prob": true, | |
| "scoring_func": "sigmoid", | |
| "routed_scaling_factor": 2.0, | |
| "use_moe_router_bias": true, | |
| "need_fp32_gate": true, | |
| "rope_fp32": true, | |
| "moe_router_weight_fp32": true, | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "sliding_window": 512, | |
| "qk_layernorm": true, | |
| "softmax_type": "learnable", | |
| "tie_word_embeddings": false, | |
| "bos_token_id": 0, | |
| "eos_token_id": 1, | |
| "pad_token_id": 2, | |
| "swiglu_limits": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 16.0, | |
| 16.0, | |
| 16.0 | |
| ], | |
| "swiglu_limits_shared": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 16.0 | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_infix_v1.InfixV1Config", | |
| "AutoModelForCausalLM": "modeling_infix_v1.InfixV1ForCausalLM" | |
| } | |
| } | |