Xing4.0 29B A4B
Xing4.0 29B A4B from XingChen-AGI. Source-based hardware guidance from its published configuration.
At a glance
- Parameters
- 31.22B
- Architecture
- xing4_0
- Context length
- 262,144
- License
- apache-2.0
- Software
- SGLang, vLLM, Transformers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareWays to run it
SGLang · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
sglang serve --model-path ${MODEL_PATH} --trust-remote-code --host 0.0.0.0 --port 8000 --served-model-name Xing4.0-29B-A4B --tp-size 2 --context-length 262144 --mem-fraction-static 0.90 --max-running-requests 32 --reasoning-parser xing4 --tool-call-parser xing4 --speculative-algorithm EAGLEvLLM · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
vllm serve ${MODEL_PATH} --host 0.0.0.0 --port 8000 --served-model-name Xing4.0-29B-A4B --tensor-parallel-size 2 --trust-remote-code --max-model-len 262144 --gpu-memory-utilization 0.90 --max-num-seqs 32 --reasoning-parser xing4 --tool-call-parser xing4 --speculative-config '{"method":"mtp", "num_speculative_tokens": 1}'Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
path = "XingChen-AGI/Xing4.0-29B-A4B"
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(path, trust_remote_code=True, device_map="auto", dtype=torch.bfloat16)
prompt = "Briefly explain the basic principles of quantum computing."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer(text, return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
top_p=0.95,
temperature=1.0,
repetition_penalty=1.05,
max_new_tokens=32768
)
response = tokenizer.decode(generated_ids[0], skip_special_tokens=False, spaces_between_special_tokens=False)
# The model output contains a Chain-of-Thought; the final answer follows </think>
answer = response.split("</think>")[-1].strip()
print(answer)Explore its uses
Keep exploring
Bonsai 2 · 27B
A compressed 27B-class reasoning model with publisher-provided GGUF packs and a dedicated llama.cpp fork for CUDA, Metal, and CPU.
DeepSeek V4.1 Flash
A multimodal reasoning model with a compressed key-value cache, published as open weights.
Qwen3.8-Flash-Next
An experimental open-weight multimodal model with sparse attention and 262K native context.