Run this model with HF Jobs

Run XHToken/Spark-X2.6-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/XHToken/Spark-X2.6-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/XHToken/Spark-X2.6-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/XHToken/Spark-X2.6-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/XHToken/Spark-X2.6-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

[HER Hack-Astron #8] [Spark × SkillHub] SKU Proof — 規格對帳台:可追溯的商品規格與包裝件數核對

#42
by chillg-research - opened

Project and track

SKU Proof · 規格對帳台 — evidence-backed SKU and pack-count checking
Track: Documents and extraction / small seller workflow. Individual entry.

Interactive evidence replay · Full source + raw evidence ZIP · Reproduction README

The public page replays saved real runs; arbitrary live inference runs locally. No server-side inference service or paid API is required.

User and task

A small online seller must compare a buying requirement with product or supplier specifications before deciding quantities. Manually checking multiple texts can confuse a sales pack's contents with shipping-package counts, or accidentally mix similar product codes.

SKU Proof records exactly five required fields: product code, capacity, product height, material and pieces per sales pack. Local Spark extracts quoted facts; deterministic code checks literal citations and supported units; the agent uses the SkillHub evidence workflow to review comparability, conflicts and gaps. The seller gets the evidence for every field and a draft, not a purchase order or stock write.

The acceptance protocol and ten case labels were committed before the first inference (453dcc5c66a6dc16538d9778ff4ae5980078286c; protocol). Requirements are explicit, every quote must locate to its source line, and a missing/conflicting product code or pack count withholds the piece total. A quantity may still be computed while another field remains unresolved; arithmetic is not purchase approval.

Inputs: three minimally quoted public IKEA Taiwan product-fact excerpts and seven original synthetic edge cases. All buying requirements and intended quantities are demonstration settings. No private customer, supplier or order data is used.

SkillHub skill and Spark-X2.6-4B

  • Skill: ForgeMind evidence checker, global/forgemind-evidence-checker 0.8.5, MIT. Retrieved from SkillHub's official CLI resolver; the public resolver returned the official ZIP without authentication. Its 14 original files are retained, manually extracted and loaded in the same project. No claim that the CLI installer ran. Provenance and actual invocation.
  • ZIP SHA-256: 014d6790d67a2fe07a33cb187bc0e6652c7aeb708185614203b6d036df403fb2. The registry's logical fingerprint is separately preserved in skill/resolve.json.
  • Agent host: Codex. It read the actual SKILL.md, decision rules, evidence schema and report template; passed the factual-comparison scope gate; treated the buyer requirements as material R and compared them with S1/S2. It applied the complete five-field checklist and produced a five-section skill report and schema-shaped result. The skill guides this evidence-review step; it is not claimed to execute inside Spark.
  • Spark's identifiable local step: extract field, literal value, 1-based line and quote from each numbered document. Its actual request/response, token usage, finish reason and duration are retained. No cloud fallback supplies its answers.
  • Model: official XHToken/Spark-X2.6-4B-GGUF, revision 83b47fda018fd14f51aa63341f78266f628af5a5, Spark-X2.6-4B-Q4_K_M.gguf. Matching cached weights were reused after checking size/hash; no new 3.54 GB download was needed. Model page is Liked.
  • Other tools: Python standard library for serving, normalization and checks; HTML/CSS/JS for UI; llama.cpp for inference; Ego for agent-operated browser testing; Sites for publishing the static evidence replay. Codex retains its host model and delegates extraction to Spark.

Demo — consecutive screenshots of a real run

This is an agent-operated illustrated demo, not a human usability study. It uses an original synthetic supplier discrepancy, clearly labelled in the UI. Screenshots are actual browser captures. Open each image for full resolution.

1. Input. Requirements are DEMO-CUP-01, 400 ml, 16 cm, glass, 6 pieces per pack and 3 packs. S1 says 每包: 6 件裝; S2 says 每包: 4 件裝. The two texts otherwise agree.

Input and both source texts

2. Execute. The local button sends both numbered texts to Spark; the controls disable while the request is running. This screenshot was taken immediately after starting the same real run, before the result appeared. The two model calls took 10.66 seconds in total.

Local Spark running

Actual S2 extraction from this run (unchanged fact object):

{
  "field": "pack_count",
  "value": "4 件裝",
  "line": 5,
  "quote": "每包: 4 件裝"
}

3. Actual result. All five fields appear. Both conflicting package statements remain visible with their line numbers. The tool does not choose either source: total pieces are withheld (null). The requirement remains 6 pieces; no value was silently overwritten.

Result with conflicting package counts

4. Raw output and review. The expanded panel shows the actual model prompts/responses. Download the exact exported JSON from this run. Locate S1/S2 line 5 in the raw text, then compare the accepted evidence and final result. The downloaded skill report separately checks the same input/output. Review stays pending; no human approval is invented. Editing inputs hides the old result, verified in browser QA.

Raw model record and pending review

To examine more cases, use the public page's example selector and 查看已保存實測. Replay is explicitly labelled; it restores the saved input instead of pretending to infer from edits. Examples include missing pack count, an incorrect product code, outer-box height, equivalent units, material mismatch and a shipping-count trap.

Reproduction

Download/unzip the source. Python 3.12+; no pip dependencies. Provide the official GGUF and llama.cpp binary, then in the project directory:

export SKU_MODEL_PATH=/absolute/path/Spark-X2.6-4B-Q4_K_M.gguf
export SKU_LLAMA_SERVER=/absolute/path/llama-server
sh start_model.sh
# In a second terminal:
python3 server.py
# Open http://127.0.0.1:8772

Run python3 -m unittest discover -s tests -v. For a fresh real evaluation, run python3 evaluate.py --run-id MY_NEW_RUN; existing run directories cannot be overwritten. The source ZIP contains original skill files, cases, initial gold labels, both real development rounds, final recheck, UI run exports and screenshots. source-manifest.json lists file hashes.

To reproduce the skill-guided step, load skill/upstream/SKILL.md in the agent, read its required support files, and ask it to compare only the five requirements in input against S1/S2 in the exported JSON, verifying every retained Spark quote; follow the upstream report template. This is separate from using the app's narrow deterministic subset.

Environment: macOS arm64, Apple M5, 16 GiB RAM; llama.cpp build 11669, version 0.7.0-dev, commit 620d2225c; Q4_K_M, 4,096 context, parallel 1, 4 threads, batch/ubatch 256, GPU layers 99. Requests use temperature 0, seed 20261123, reasoning off, 1,100 output-token limit and constrained JSON schema. Full prompt/schema/parameters are retained for every request. Weights are 3,543,441,312 bytes, SHA-256 91cb2811aebb47ac916aa619d27d4cdd7f4143106b7917accb8ead4cd7f5cbd9. README gives exact upstream download/runtime references and boundaries.

Results and limitations

Ten small known development cases, five field-state decisions per case, one piece-total decision each. One case has two sources, making 11 model calls per round. The model never receives the gold labels. Exact field states, not extraction recall, were scored:

Stage Matches to original gold field labels Quantity decisions Median model seconds/case
Prompt v1 48/50 9/10 5.44
Prompt v2, same inputs 50/50 10/10 5.53
Final skill-reviewed validator, same saved v2 responses 49/50 10/10 No new model calls

Failure and improvement: v1 sometimes returned a bare 6, which the strict unit check refused. V2 explicitly requested the original unit. The original v1/v2 records remain unedited.

The gold itself had one error. Applying the downloaded skill revealed that a different product code should be an applicability gap (insufficient), not a hard conflict about the target product. We corrected the final validator and retained the original label and earlier scores. Thus final matching is honestly 49/50 against that initial gold, not a retroactively manufactured perfect score. The final recheck identifies the exact change. Final replay uses this reviewed validator. Fifteen deterministic tests pass, covering citation fabrication, incorrect line numbers, unsupported/approximate units, mismatched/multiple codes, conflicts, shipping counts, outer-box dimensions, negation and invalid quantities.

No held-out accuracy, real procurement time saving or human evaluation is claimed. Quote presence does not prove semantic correctness. Spark may omit facts or miss another product variant. Only five explicit fields and a narrow unit vocabulary are supported. Material matching is literal. Complex conditions, date/version precedence, ranges and OCR require further work. Product pages are quoted snapshots, not current-stock or freshness verification. UI review selections are not authenticated identities. The prototype does not purchase, contact suppliers, certify products or write inventory.

Contributors and disclosure

Individual: ChillG — Hugging Face chillg-research, GitHub eric0219c. The account owner requested implementation and submission; Codex selected the seller-workflow concept. Codex designed and implemented the app, selected minimal public facts, authored synthetic cases and initial gold, ran tests/model/browser QA, applied the skill and prepared this entry. Spark produced the recorded extraction outputs. AI tools are not listed as human team members; no human code or output review is claimed.

Original application code and synthetic cases: MIT. ForgeMind: MIT, original license retained. Minimal product facts are attributed to their IKEA Taiwan source URLs in every public case; headings and fact values were joined into short numbered excerpts. No product photos, reviews, prices or private records are republished, and there is no brand endorsement. Spark weights and llama.cpp binaries are not bundled and retain their upstream licenses. Secrets, model keys, personal addresses and private runtime logs are excluded from the public source archive.

Thank you for separating pieces per sales pack from shipping-package counts. A literal quote can pass a citation check while describing the outer carton, so withholding the total when the pack count is unresolved is an important design choice. Could you add a paired fixture with the same two quantities but swap which one describes the sales pack? Keeping the model extraction, validator decision and final piece total side by side would let us pinpoint a failure even when the arithmetic is correct.

Sign up or log in to comment