Run this model with HF Jobs

Run XHToken/Spark-X2.5-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.5-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.5-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.5-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.5-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.

feat(attention): add KV-BSS (Key-Value Binding Softmax Sharpening) and attention haze suppression

#15

This PR implements KV-BSS (Key-Value Binding Softmax Sharpening) in modeling_spark.py:

  1. Backwards Compatible: Defaults to key_value_binding_sharpening=False and attention_sink_suppression=False, preserving 100% exact baseline behavior unless explicitly enabled in config.json.
  2. Key-Value Binding Sharpening: When enabled (key_value_binding_sharpening=True), scales attention logits with kv_focus_factor (default 1.10) to steepen peak Softmax probabilities around exact antecedent bindings (e.g. structured JSON, dictionaries, AST variable mapping).
  3. Attention Haze Truncation: Truncates parasitic background attention haze (< max_logits - 12.0) to -inf before Softmax, preventing probability mass diffusion over long sequence windows.

Refer to Community Discussion #14 for empirical derivations and benchmarks:
https://huggingface.co/XHToken/Spark-X2.5-4B/discussions/14
And proof-of-concept release:
https://huggingface.co/F-Labs/Spark-X2.5-4B-Hadamard-GSQ

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment