DEV Community

SparkLLM
SparkLLM

Posted on

One receipt, two rooms: what it takes to run Spark 4B locally

The receipt says someone paid 60 yuan to clean the screen in “the room we sleep in.” In Ykmmz’s synthetic move-out demo, DepositTrace and a local Spark-X2.6-4B initially match it to the west bedroom. Forward the very same receipt and Spark suggests the east room. Watch the reviewer change it back: the program flags the duplicate and counts the payment once.

SPARK compares two receipts. Three community experiments investigate a 60-yuan receipt, 880 matched prompts and GPU memory on an M3 Pro.

Watch the author’s demo

The author then froze 21 new synthetic evidence lines across seven scenarios. Rules and the complete system each made 16 correct assignment decisions, including correct blanks. Spark helped the system recover four links the rules missed. It also assigned four lines that should have stayed blank. A reviewer gets to see the proposed item and its source before it enters the record.

On 21 synthetic lines, rules got 10 links and 6 blanks right. DepositTrace got 14 links and 2 blanks right, with 4 wrong links and 1 parse failure.

DepositTrace’s frozen supplementary set

Waiting is a different part of local inference. Septend-fun attached two SpeedBench runs to the llama.cpp DSpark integration PR. We matched all 880 prompt IDs across 11 categories. With concurrency 1, temperature 0 and an output cap of 1,024 tokens, mean decode speed rose from 88.78 to 200.86 tokens/s. Coding gained 2.45× and writing 1.91×. Mean request time fell from 11.99 to 5.49 seconds; 72 prompts produced different output lengths between runs.

In 880 matched SpeedBench prompts on a llama.cpp PR branch, mean decode speed rose from 88.78 to 200.86 tokens/s. Coding gained 2.45× and writing 1.91×.

SpeedBench results and both raw files

Then there is the memory needed just to get started. On a 36 GB M3 Pro, TensorFold contributor jschmied found that an 8.22 GB BF16 checkpoint peaked at 13.0 GB of GPU memory during load and a 200-token request. Metal combined several weight matrices and kept their source buffers around. Staging the weights as they loaded brought the measured peak to 8.24 GB. The 4-bit build went from 3.92 to 2.60 GB on the same test.

TensorFold author measurements on a 36 GB M3 Pro: BF16 peak GPU memory fell from 13.00 to 8.24 GB; 4-bit fell from 3.92 to 2.60 GB.

TensorFold’s measurements and review

Top comments (0)