Text Generation
Transformers
Safetensors
English
Chinese
spark2_5
llm
sparkx2_5
conversational
custom_code
Instructions to use XHToken/Spark-X2.6-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XHToken/Spark-X2.6-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XHToken/Spark-X2.6-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XHToken/Spark-X2.6-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XHToken/Spark-X2.6-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XHToken/Spark-X2.6-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XHToken/Spark-X2.6-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XHToken/Spark-X2.6-4B
- SGLang
How to use XHToken/Spark-X2.6-4B 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 "XHToken/Spark-X2.6-4B" \ --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": "XHToken/Spark-X2.6-4B", "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 "XHToken/Spark-X2.6-4B" \ --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": "XHToken/Spark-X2.6-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XHToken/Spark-X2.6-4B with Docker Model Runner:
docker model run hf.co/XHToken/Spark-X2.6-4B
关于Tau3分数的疑问
#4
by yche - opened
您好,关于您在Benchmark-Result里放的Tau3的分数,有一些疑问。Tau3的分数按照官方的计算方法似乎是四个榜的分数取平均,但是文档里报的分数不太像是四个子榜分数的算术平均?我们这里评的是Tau3-Banking吗
你好,感谢你对我们评测结果的关注。首先澄清一下:我们报告的 𝜏³ 分数特指 𝜏³-Banking 的评测结果,并非 4 个子任务分数的平均值。
我们采用了 Artificial Analysis 公布的 𝜏³-Banking 评测方案(https://artificialanalysis.ai/methodology/intelligence-benchmarking#tau3-banking),具体设置如下:
- 使用上游 tau2-bench v1.0.1 的数据集和评分器,评估完整的 97 个 Banking 任务。
- 采用 bm25_grep 检索模式。
- 使用 GPT-5.4 Mini(中等推理强度)作为用户模拟器和自然语言断言判定器。
- 每个任务重复运行 5 次,每次最多 200 步。“步”按照评测框架中的消息计数,包含用户模拟器的消息,而不只是被评测模型的轮次。
- 根据后端数据库的实际状态及相关断言判定任务是否成功,最终报告全部 97 个任务、每个任务运行 5 次的平均 pass@1 分数。