Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
2c85ee4
Add Skippy cross-request token decode batching
i386 Jun 5, 2026
5980d56
Batch Skippy split decode frames across requests
i386 Jun 5, 2026
bb3af8f
Avoid fixed decode batch rendezvous waits
i386 Jun 5, 2026
59d6b25
Document micstudio-first lab startup
i386 Jun 13, 2026
ff12eed
Keep lab startup note in skill only
i386 Jun 13, 2026
abd7e71
Carry split GGUF tensor spooling patch
i386 Jun 13, 2026
b71f8ae
Document native MTP Skippy architecture
i386 Jun 15, 2026
876a9f6
Add native MTP n1 verification scaffold
i386 Jun 15, 2026
250ddd5
Add GLM DSA native MTP graph patch
i386 Jun 15, 2026
ac37d00
Add native MTP n1 decode ABI
i386 Jun 15, 2026
c5ca8b9
Wire native MTP n1 sidecar drafts
i386 Jun 15, 2026
c411e9b
Teach correctness harness native MTP sideband
i386 Jun 15, 2026
2e1d0e9
Gate correctness on native MTP drafts
i386 Jun 15, 2026
3e3d88d
Document GLM 5.1 native MTP proof gate
i386 Jun 15, 2026
3068cde
Pivot native MTP proof gate to GLM 4.7
i386 Jun 15, 2026
967e34c
Record GLM 4.7 MTP artifact gap
i386 Jun 15, 2026
c044ab8
Point GLM 4.7 MTP gate at meshllm artifact
i386 Jun 15, 2026
b15f44f
Preflight native MTP correctness artifacts
i386 Jun 15, 2026
1f3e958
Preserve fused native MTP drafts
i386 Jun 15, 2026
2c78ee8
Verify native MTP n1 correctness
i386 Jun 15, 2026
caec7cd
Cover native MTP direct return replies
i386 Jun 15, 2026
59e9ef4
Support DeepSeek2 GLM MTP n1 split drafts
i386 Jun 15, 2026
2d8f702
Add native MTP batched verification path
i386 Jun 15, 2026
1b73777
Fix GLM native MTP batched verification
i386 Jun 15, 2026
57d8cb0
Gate native MTP batched verification
i386 Jun 15, 2026
b8fd760
Add native MTP OpenAI A/B correctness check
i386 Jun 15, 2026
9aea3ca
Compare native MTP against greedy baseline
i386 Jun 15, 2026
8945b14
Prepare native MTP correctness for lab endpoints
i386 Jun 15, 2026
d68a705
Add remote stage1 native MTP correctness launch
i386 Jun 15, 2026
bfc0802
Trace lab split stage readiness
i386 Jun 15, 2026
3b0467c
Return split predictions over stage lane
i386 Jun 15, 2026
87fa613
Merge origin/main into GLM MTP branch
i386 Jun 15, 2026
7a416f6
Checkpoint native MTP batched rejections
i386 Jun 15, 2026
42f030b
Restore native MTP hybrid trim rejection
i386 Jun 15, 2026
d3fcb29
Normalize GLM native MTP patch queue
i386 Jun 15, 2026
603df89
Include native MTP tensors in final slices
i386 Jun 15, 2026
ecdc6f6
Expose GLM MTP hidden state after output norm
i386 Jun 15, 2026
87dd658
Improve GLM Skippy single-stage parity
i386 Jun 16, 2026
5a868e4
Sample batched GLM MTP verify frames
i386 Jun 16, 2026
532aed8
Gate serial stage0 MTP verification experiment
i386 Jun 16, 2026
a3f2246
Return MTP drafts from verify spans
i386 Jun 16, 2026
781d9ce
Improve GLM MTP parity instrumentation
i386 Jun 16, 2026
f357af3
Instrument GLM stage0 MTP verify comparison
i386 Jun 16, 2026
2940600
Add row-level GLM stage0 compare telemetry
i386 Jun 16, 2026
4db25f3
Add serial VerifySpan diagnostic path
i386 Jun 16, 2026
d790fb2
Add reject cooldown for batched MTP
i386 Jun 16, 2026
658549c
Add serial recovery gate for batched MTP
i386 Jun 16, 2026
7a75433
Add MTP verify-next margin sideband
i386 Jun 16, 2026
3e02e09
Add MTP verify-next margin summary telemetry
i386 Jun 16, 2026
f7b5fd4
Add deferred MTP reject trim diagnostic
i386 Jun 16, 2026
0c27dbf
Add MTP cooldown draft suppression diagnostic
i386 Jun 16, 2026
e1bedd6
Add MTP cooldown suppression limit diagnostic
i386 Jun 16, 2026
5c1a235
Add native MTP draft origin telemetry
i386 Jun 16, 2026
2a67994
Add gap-origin MTP recovery override
i386 Jun 16, 2026
bd37544
Add decode-sidecar MTP margin telemetry
i386 Jun 16, 2026
cc91041
Gate decode-sidecar MTP margin computation
i386 Jun 16, 2026
54bfc60
Merge remote-tracking branch 'origin/main' into feat/jianyang-glm-lla…
i386 Jun 16, 2026
1334467
Add gap-origin MTP skip probe diagnostic
i386 Jun 16, 2026
9646def
Target serial stage0 verify to MTP gap reentry
i386 Jun 16, 2026
6a89caa
Add native MTP recovery scheduling telemetry
i386 Jun 16, 2026
c5b4be1
Add native MTP verify-next recovery telemetry
i386 Jun 16, 2026
78c6e3c
Add VerifySpan summary timing telemetry
i386 Jun 16, 2026
8e88d17
Add serial-after-gap direct MTP verify diagnostic
i386 Jun 16, 2026
201a911
Merge remote-tracking branch 'origin/main' into feat/jianyang-glm-lla…
i386 Jun 16, 2026
f8fb447
Add HF GGUF quant jobs skill
i386 Jun 16, 2026
6c2dc98
Remove unused skippy ABI exports
i386 Jun 16, 2026
0398754
Squash GLM MTP llama patch tail
i386 Jun 16, 2026
2f717f3
Split native MTP modules
i386 Jun 16, 2026
9b2f6fe
Fix skippy stage-lane smoke drivers
i386 Jun 16, 2026
19d5a35
Fix MTP sidecar review gaps
i386 Jun 16, 2026
fe2b193
Instrument Skippy batched MTP verifier overhead
i386 Jun 17, 2026
117093f
Optimize skippy reply stats transport
i386 Jun 17, 2026
399b089
Avoid summary-path MTP debug bookkeeping
i386 Jun 17, 2026
69afc0f
Reduce summary eviction telemetry on MTP path
i386 Jun 17, 2026
265a5a1
Add VerifySpan compute summary telemetry
i386 Jun 17, 2026
03bd6ad
Add Skippy auto-align summary telemetry
i386 Jun 17, 2026
8982fa8
Add Skippy MTP margin outcome telemetry
i386 Jun 17, 2026
96b25cd
Fix native MTP margin threshold fallback
i386 Jun 17, 2026
f9bb192
Expose VerifySpan width telemetry
i386 Jun 17, 2026
172e387
Add local VerifySpan microbench
i386 Jun 17, 2026
482d8ab
Profile in-process VerifySpan split overhead
i386 Jun 17, 2026
68902c1
Compare split VerifySpan batched and serial paths
i386 Jun 17, 2026
99c1176
Add split VerifySpan timing diagnostics
i386 Jun 17, 2026
8bb94eb
Expose VerifySpan overhead breakdown
i386 Jun 17, 2026
6539d1c
Avoid copying VerifySpan activation inputs
i386 Jun 17, 2026
ebbf648
Expose batched MTP proposal timing
i386 Jun 17, 2026
956663d
Add VerifySpan native timing diagnostics
i386 Jun 17, 2026
b1b72c3
Break down VerifySpan MTP sync timing
i386 Jun 17, 2026
aa748d3
Split VerifySpan MTP sync setup timing
i386 Jun 17, 2026
a8a906c
Add Skippy greedy sampling fast path
i386 Jun 17, 2026
7c3e3cc
Merge remote-tracking branch 'origin/main' into feat/jianyang-glm-lla…
i386 Jun 17, 2026
b94cc76
Trim losing MTP verifier diagnostics
i386 Jun 17, 2026
e5704a3
Trim native MTP review path
i386 Jun 17, 2026
fb4b6e8
Add GLM SPD-on-MTP experiment path
i386 Jun 17, 2026
3bb71cc
Fix GLM SPD training assistant masks
i386 Jun 17, 2026
9fe4f97
Add numpy to SPD export script deps
i386 Jun 17, 2026
0ba1f5d
Add generic SPD topology planning
i386 Jun 17, 2026
96d258e
Add generic layer-tap SPD sidecar
i386 Jun 17, 2026
d6d6625
Harden generic GLM SPD quality gate
i386 Jun 17, 2026
f7b3876
Add reusable SPD layer-tap example cache
i386 Jun 17, 2026
7ecf25c
Reuse generic SPD caches across draft widths
i386 Jun 17, 2026
806dafe
Add SPD top-k quality diagnostics
i386 Jun 17, 2026
fd19f3d
Add fixed layer tap SPD controls
i386 Jun 18, 2026
e168ced
Batch GLM SPD hidden state extraction
i386 Jun 18, 2026
7ec4be5
Fix GLM SPD reduced-vocab training loss
i386 Jun 18, 2026
af94b35
Filter GLM SPD rows without next-token labels
i386 Jun 18, 2026
6e1ba0d
Expose GLM SPD trainer schedule controls
i386 Jun 18, 2026
6437029
Add skippy quantize CLI
i386 Jun 20, 2026
0627f2e
Finish native skippy quantize path
i386 Jun 21, 2026
d7df7c3
Finish skippy quantize parity validation
i386 Jun 21, 2026
2b65f5d
Document skippy quantize parity smoke
i386 Jun 21, 2026
f1bed85
Make skippy quantize standalone
i386 Jun 21, 2026
3eb0934
Format skippy quantize CLI output
i386 Jun 21, 2026
2536238
Document skippy quantize CLI output examples
i386 Jun 21, 2026
b08cf5f
Add skippy quantization workflow skills
i386 Jun 21, 2026
c723425
Add skippy quantize dry run planning
i386 Jun 21, 2026
0ba0a1a
Add periodic skippy quantize status snapshots
i386 Jun 21, 2026
7dac036
Fix CI crate lists for llama quant ffi
i386 Jun 21, 2026
18ffbb2
Drop patched llama quantize conversion queue
i386 Jun 22, 2026
d179366
Add GLM DSA quant layer package workflow
i386 Jun 23, 2026
ae186e3
Add direct quantized layer package flow
i386 Jun 23, 2026
14b7c13
Fix native GGUF split offsets
i386 Jun 23, 2026
8961d47
Require explicit tensor recipes for custom quant profiles
i386 Jun 23, 2026
a50b0a8
Forward tensor recipes in layer package quant hook
i386 Jun 23, 2026
2ddd54f
Forward metadata overrides for package quantization
i386 Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .agents/skills/hf-bf16-gguf-conversion-jobs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
name: hf-bf16-gguf-conversion-jobs
description: Use when converting Hugging Face SafeTensors checkpoints into split BF16 GGUF model repos with skippy-quantize on Hugging Face Jobs or a local machine, then publishing the artifact to Hugging Face.
metadata:
short-description: Convert HF checkpoints to BF16 GGUF repos
---

# HF BF16 GGUF Conversion Jobs

Use this skill when the source artifact is a Hugging Face checkpoint repo and
the target artifact is a split BF16 GGUF model repo. The operational tool is
`skippy-quantize`; do not use `convert_hf_to_gguf.py`, `hf_to_gguf.py`, or a
wrapper that shells out to either script. Treat `hf_to_gguff.py` as the same
forbidden path if it appears in old notes or logs.

## Preconditions

- Confirm the source checkpoint repo, revision, tokenizer files, target repo,
output basename, expected split count, and desired split size before spending
HF Jobs credits.
- Build the standalone binary with `just skippy-quantize-standalone-release-build`
for local runs or in the job image/script for HF Jobs.
- Use `--output-type bf16` unless the experiment explicitly records a different
target precision.
- Prefer a split output with `--window-size 1` for first full-model runs. Raise
the window only after a smaller fixture proves the memory and I/O budget.
- Publish only complete windows, write per-window records, and resume from the
first missing target shard after cancellation.

## Local Workflow

Create a manifest:

```bash
target/release/skippy-quantize init-convert \
--source /path/to/checkpoint \
--target /path/to/output-repo \
--target-prefix BF16 \
--output-basename <model>-BF16 \
--output-type bf16 \
--expected-splits <N> \
--window-size 1 \
--manifest /tmp/skippy-convert.json
```

Dry-run the next conversion window before spending I/O:

```bash
target/release/skippy-quantize convert-job \
--source /path/to/checkpoint \
--target /path/to/output-repo \
--target-prefix BF16 \
--output-basename <model>-BF16 \
--output-type bf16 \
--expected-splits <N> \
--window-size 1 \
--manifest /tmp/skippy-convert.json \
--max-memory 32G \
--dry-run
```

Run until complete:

```bash
target/release/skippy-quantize run-convert \
--manifest /tmp/skippy-convert.json \
--max-memory 32G \
--split-max-size 50G \
--stream-buffer-bytes 8388608 \
--spool-dir /tmp/skippy-convert-output \
--record-dir /tmp/skippy-convert-records \
--json-event-file /tmp/skippy-convert-status.json \
--json-event-interval-seconds 120 \
--json-event-window 8
```

Validate and publish:

```bash
target/release/skippy-quantize verify-job \
--manifest /tmp/skippy-convert.json \
--json

hf repo create <org>/<target-repo> --type model --private
hf upload <org>/<target-repo> /path/to/output-repo . --repo-type model
```

## HF Jobs Workflow

Mount the source checkpoint and target model repo rather than downloading the
whole checkpoint into the job filesystem:

```bash
hf jobs uv run \
--namespace meshllm \
--flavor cpu-upgrade \
--timeout 3d \
--secrets HF_TOKEN \
--volume hf://models/<source-repo>:/mnt/checkpoint \
--volume hf://models/<target-repo>:/mnt/target \
--env SKIPPY_QUANTIZE_OUTPUT=json \
--env PYTHONUNBUFFERED=1 \
--detach \
/path/to/skippy_convert_job.py \
-- \
--source /mnt/checkpoint \
--target /mnt/target \
--target-prefix BF16 \
--output-basename <model>-BF16 \
--expected-splits <N> \
--split-max-size 50G \
--max-memory 32G
```

The job script should only build or install `skippy-quantize`, create the
manifest if missing, run `run-convert`, verify the job, and upload sidecars. It
must not call the old Python converter.

## Monitoring

Use both HF Jobs status and `skippy-quantize` status:

```bash
hf jobs inspect <job-id> --namespace meshllm
hf jobs logs <job-id> --namespace meshllm --tail 120
target/release/skippy-quantize status --manifest /tmp/skippy-convert.json --json
```

For agents, prefer polling `/tmp/skippy-convert-status.json` over ingesting full
logs. Healthy snapshots show phase movement through `running`, `publishing`,
and `complete`, with only the last few high-level events retained. Stop and
diagnose if the same window restarts without a new published shard or memory
stays pinned near the hardware limit.

## Record Keeping

Record the job id, exact command, source revision, target repo commit, split
count, split size, memory budget, tokenizer notes, and follow-ups in the
experiment card or phase iteration card before promoting the artifact.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "HF BF16 GGUF Conversion Jobs"
short_description: "Convert HF checkpoints to BF16 GGUF repos with skippy-quantize."
default_prompt: "Create or monitor a skippy-quantize BF16 GGUF conversion job."
202 changes: 202 additions & 0 deletions .agents/skills/hf-gguf-quant-jobs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
---
name: hf-gguf-quant-jobs
description: Use when creating, monitoring, validating, or documenting low-memory Hugging Face Jobs or local runs that quantize split BF16/FP16 GGUF model repos into custom quant GGUF repos with skippy-quantize.
---

# HF GGUF Quant Jobs

Use this skill to turn an existing split BF16/FP16 GGUF model repo into a
quantized GGUF model repo without requiring the host to hold the full model in
memory or on local disk at once. The operational tool is `skippy-quantize`; do
not use `llama-quantize`, `llama-quantise`, or wrapper scripts that shell out to
those binaries.

The supported pattern is: mount or point at the source BF16/FP16 GGUF repo,
quantize resumable split windows with `skippy-quantize`, publish completed
output shards to the target model repo, delete staged files immediately, and
resume from the first missing target shard after cancellation or failure.

## Preconditions

- Use a split BF16/FP16 GGUF repo as the source when possible. Do not re-read
SafeTensors for requants if a BF16 GGUF artifact already exists.
- Verify the source repo is complete before spending on quantization. Count all
expected split shards and refuse to run if any are missing.
- Use a tensor-type file for any custom recipe. Treat MTP tensors, output
tensors, precision-sensitive tensors, and latency-sensitive layer ranges as
explicit recipe inputs.
- Run jobs under the intended HF org and pass `HF_TOKEN` as a secret, not a
printed environment variable.
- Prefer mounted Hub repos over full `hf download` when the job only needs to
stream or stage one shard/window at a time.
- Build the standalone binary with `just skippy-quantize-standalone-release-build`
for local runs or in the job image/script for HF Jobs.

## Workflow

1. Identify the source BF16/FP16 GGUF repo, target quant repo, output prefix,
output basename, source prefix, quant type, tensor-type file, memory budget,
and split window size.
2. Preflight both Hub and mounted source paths with `skippy-quantize status`,
`next-window`, `validate-splits`, or a `quantize --preflight-only` run. Stop
if the source artifact is incomplete.
3. Write or upload a `quant-plan.json` with source repo/revision, target repo,
quant type, shard count, output prefix, tensor policy, and resume
settings.
4. Launch the job with `--window-size 1` for the first full model run unless a
smaller fixture proves a larger window is safe on the chosen hardware.
5. For each split window, stage only the required input shard, run
`skippy-quantize run-quant-window` or `run-quant`, publish finished shards,
then delete local staged input and output files.
6. Monitor for progress markers. A healthy job repeatedly emits staged source
copies, `quant_window`, publish completion, cleanup, and increasing split
progress.
7. Validate the target repo after completion by counting GGUF shards, checking
the first and last shard names, and confirming `quant-plan.json` plus the
tensor-type file are present.
8. Record the artifact in the experiment card and create an iteration card for
the run, including job id, command, environment, repo SHA, shard count, and
follow-up decisions.

## Launch Template

Create a quantization manifest:

```bash
target/release/skippy-quantize init-quant \
--source /mnt/source-gguf \
--source-prefix <source-prefix> \
--target /mnt/target-quant \
--target-prefix <target-prefix> \
--output-basename <output-basename> \
--quant <quant> \
--tensor-type-file /mnt/recipe/tensor-types.txt \
--window-size 1 \
--manifest /tmp/skippy-quantize.json
```

Dry-run the next quantization window before spending I/O:

```bash
target/release/skippy-quantize quant-job \
--source /mnt/source-gguf \
--source-prefix <source-prefix> \
--target /mnt/target-quant \
--target-prefix <target-prefix> \
--output-basename <output-basename> \
--quant <quant> \
--tensor-type-file /mnt/recipe/tensor-types.txt \
--window-size 1 \
--manifest /tmp/skippy-quantize.json \
--backend llama-api \
--max-memory 32G \
--dry-run
```

Run until complete:

```bash
target/release/skippy-quantize run-quant \
--manifest /tmp/skippy-quantize.json \
--backend llama-api \
--max-memory 32G \
--work-dir /tmp/skippy-quantize-work \
--spool-dir /tmp/skippy-quantize-output \
--record-dir /tmp/skippy-quantize-records \
--json-event-file /tmp/skippy-quantize-status.json \
--json-event-interval-seconds 120 \
--json-event-window 8
```

For HF Jobs, mount the BF16/FP16 source repo and target quant repo, then run the
same manifest and `run-quant` commands inside the job:

```bash
hf jobs uv run \
--namespace meshllm \
--flavor cpu-upgrade \
--timeout 3d \
--secrets HF_TOKEN \
--volume hf://models/<source-repo>:/mnt/source-gguf \
--volume hf://models/<target-repo>:/mnt/target-quant \
--env SKIPPY_QUANTIZE_OUTPUT=json \
--env PYTHONUNBUFFERED=1 \
--detach \
/path/to/skippy_quant_job.py \
-- \
--source /mnt/source-gguf \
--source-prefix <source-prefix> \
--target /mnt/target-quant \
--target-prefix <target-prefix> \
--output-basename <output-basename> \
--quant <quant> \
--tensor-type-file /mnt/recipe/tensor-types.txt \
--max-memory 32G
```

The job script should only build or install `skippy-quantize`, prepare the
manifest if missing, run `run-quant`, verify the job, and upload sidecars.

## Monitoring

Check status and logs:

```bash
hf jobs inspect <job-id> --namespace meshllm
hf jobs logs <job-id> --namespace meshllm --tail 120
```

For agents, prefer polling `/tmp/skippy-quantize-status.json` over ingesting
full logs. It is a periodically refreshed compact snapshot with the current
phase, current split window, and a bounded recent-event window.

Useful healthy markers:

- `Preflight QuantizeGguf with backend llama-api`
- `Source artifact is complete`
- `quant_window`
- `Published /mnt/target-quant/...`
- `Cleaned staged source`
- `split artifact ... 100.00%`

Concerning markers:

- repeated watchdog lines with no shard, tensor, upload, or cache-drop progress;
- cgroup memory pinned near the hardware limit;
- the same split window restarting repeatedly without new uploaded target files;
- fallback quant warnings for tensors that the recipe expected to preserve.

If a job stalls, cancel it before changing code or hardware. The next run should
skip already published shards and resume at the first missing output shard.

## Validation

After completion, verify the target repo with an authenticated Hub API or CLI
check. Record at least:

- target repo and commit SHA;
- privacy setting;
- total file count;
- GGUF shard count;
- first and last shard names;
- manifest/plan presence;
- tensor-type file presence.

For local smoke tests, use a small split GGUF source first and verify:

- `skippy-quantize verify-job --manifest <manifest> --llama-load` succeeds;
- `skippy-quantize validate-splits --root <target> --prefix <prefix>` succeeds;
- max RSS stays bounded compared with full-model size;
- `skippy-quantize status --manifest <manifest> --json` reports completion.

## Documentation Contract

For Jianyang-style experiments, update both records:

- the main experiment card with the promoted artifact;
- a phase iteration card with the job id, exact command, environment,
verification output, decision, and follow-ups.

Keep post-experiment upstream notes separate from the run decision. The job can
be successful while the converter or quantizer patches still need extraction
into clean upstream PRs.
4 changes: 4 additions & 0 deletions .agents/skills/hf-gguf-quant-jobs/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "HF GGUF Quant Jobs"
short_description: "Run low-memory GGUF quantization jobs with skippy-quantize."
default_prompt: "Create or monitor a low-memory skippy-quantize GGUF quantization job."
Loading
Loading