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
[HER Hack-Astron #8] [Spark × SkillHub] Two deadlines with page evidence in TVöD-Radar
Project and track
TVöD-Radar · Documents and extraction
Download the reproduction package for both circulars. It contains the runner, exact prompt templates, raw replies and offline verification scripts.
User and task
An editor reviewing changes to Germany’s federal public-sector collective agreement needs to find dates in administrative circulars, identify who has to act, and keep the source passage handy for review. A circular can put an employee declaration deadline and a ministry reporting date several pages apart. The two dates serve different people and actions.
The input is a 14-page German circular dated 17 July 2026 from the Federal Ministry of the Interior (BMI). The reference answers stay separate from the prompts. The employee declaration and the BMI’s first evaluation data request must each have the correct actor, the exact date, the correct PDF page, and a verbatim excerpt from that page containing the date. Official circular
SkillHub skill and Spark-X2.6-4B
Codex read the installed policy-implementation-ambiguity-map skill, version 1.0.2, and applied its clause-extraction workflow to the two target dates. The skill guided the separation of actors, actions and dates, the binding of each finding to a source excerpt, and the treatment of the two time windows as distinct items. SkillHub registry entry
Codex extracted page-labelled text with Poppler, called a local llama-server and ran a separate Python verifier. Spark produced the page references, date fields, actors, actions and verbatim excerpts. The model was XHToken/Spark-X2.6-4B-GGUF at revision 9d716770ac7477776de5f891f70cdf98b003a5cd, file Spark-X2.6-4B-Q4_K_M.gguf. Pinned model revision
Illustrated walkthrough
Source and task. Codex sends the circular with PDF page markers and asks Spark to extract the two dated actions with evidence.
Spark output. The first run finds both passages. A focused second request uses the pages selected by Spark in that run and asks it to extract each date from its supporting passage. The expected dates and verification results stay outside both requests.
Verification. The result pairs the employee declaration with 1 September, page 4, and the BMI’s first evaluation data request with 31 January 2027, page 11. The verifier compares the actors, dates and pages with the reference answers, then checks that each excerpt contains its date and occurs on its cited page. The original passages are available for the editor to inspect before using the result.
Reproduction
The pilot ran on an Apple M3 Max with 64 GB of unified memory and llama.cpp 1.0.0, build 12359 (b1b770d90), using Q4_K_M quantization. Both requests used a 16,384-token context, temperature 0, seed 42, a generation cap of 1,024 tokens, and reasoning mode off.
- Install
policy-implementation-ambiguity-mapv1.0.2 from the linked SkillHub listing and use its actor, action, time and source-binding steps. - Extract the 14-page PDF with Poppler 26.04.0 using
pdftotext -layout SOURCE.pdf -. Split on form feeds and prefix each page with[PDF-Seite N]. PDF SHA-256 is522053a3b771b76b7b95d238c24563be21aa47ecbfcd9f653320c02b37c65901. Original PDF - Load the pinned GGUF in
llama-serverwith--ctx-size 16384 --parallel 1 --reasoning off --n-gpu-layers all. Its SHA-256 is91cb2811aebb47ac916aa619d27d4cdd7f4143106b7917accb8ead4cd7f5cbd9. Send the prompt shown above with all pages. Request JSON with two objects,beschaeftigteandverwaltungsabfrage. Each row hasdatum,adressat,vorgang,pdf_seiteandbeleg. - In a second request, include only the page numbers returned by the first reply. Ask Spark to select the supporting sentence first, copy the date from it, and identify the actor. Ask for day and month for the employee deadline, and day, month and year for the explicitly first administrative query. Keep reference dates out of both prompts.
- Compare the output with the original PDF. For each item check date, actor and cited page, then check that the date appears in the quote and the quote occurs on that page. The comparison normalizes layout whitespace and soft hyphens.
Results and limitations
In the first pass, Spark cited the right pages and returned source excerpts containing the two expected dates. Both structured date fields failed. Spark filled the employee row with the circular’s publication date and the BMI row with the recurring 30 April date. It also used the letterhead address for both rows.
In the focused second pass, Spark used the pages it had already selected and returned both target dates, the correct actors and pages, and matching excerpts. All ten automated field checks passed. The initial pilot covered one circular and two target dates. The follow-up prompt was developed after observing the first run. Editorial review still checks who acts, whether the source is current and how the result would be used before it feeds an alert.
Contributors and disclosure
Individual entrant @mauricemohr88-debug directed the TVöD-Radar pilot. Codex adapted the SkillHub workflow, implemented and operated the run, checked the evidence and drafted the walkthrough. Spark ran locally and generated both extraction responses. The input was the public BMI circular.
Follow-up on a second circular · 22 November 2026
The test used a different BMI circular dated 19 December 2024 on amendments to TV EntgO Bund and TVÜ-Bund. We publicly registered the questions, answer key, scoring rules and code hashes before running Spark. The answer key stayed outside both prompts. We kept the same model, SkillHub workflow, temperature and seed. The longer document used a 65,536-token context. Official circular · Protocol registered before inference
| Target | Registered reference | Full-document run | Focused follow-up |
|---|---|---|---|
| Employee application deadline | 30 June 2025, PDF p. 4 | Correct date and verbatim excerpt, cited p. 5. | Spark had selected only p. 5. It marked the date unresolved and quoted an unrelated passage. |
| Default effective date of the amendments | 1 January 2025, PDF p. 5, subject to exceptions in the agreements | Correct date, page and qualifying passage. | Correct date, page and qualifying passage. |
The pre-registered checker recorded 9/12 checks on the full 45 pages and 7/12 on the focused follow-up. The effective-date row failed its strict subject field check in both runs. Run 1 named the amendments inside a generic label, and run 2 returned only the label. Both raw replies and all component checks are in the archive.
The first reply assigned page 5 to both targets. Selecting pages from unverified citations then removed page 4, which contained the employee deadline. This is a concrete failure mode of the two-request workflow. Before narrowing the source, an editor would need to check that every quotation occurs on the cited page. The two cases show how the procedure behaves on these documents and are too small to estimate general accuracy.


