Prepare Qwen3.8 artifact set
This commit is contained in:
@@ -3,6 +3,7 @@ name = "ds4-server"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.97"
|
rust-version = "1.97"
|
||||||
|
default-run = "ds4-server"
|
||||||
description = "A native macOS coding-agent GUI for DwarfStar"
|
description = "A native macOS coding-agent GUI for DwarfStar"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
publish = false
|
publish = false
|
||||||
@@ -49,3 +50,7 @@ resources = ["metal", "assets/dev-brain"]
|
|||||||
|
|
||||||
[package.metadata.packager.macos]
|
[package.metadata.packager.macos]
|
||||||
minimum-system-version = "15.0"
|
minimum-system-version = "15.0"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "qwen38-artifacts"
|
||||||
|
path = "tools/qwen38-artifacts.rs"
|
||||||
|
|||||||
2528
assets/models/qwen38-flash-next-bare-speed-tensors.tsv
Normal file
2528
assets/models/qwen38-flash-next-bare-speed-tensors.tsv
Normal file
File diff suppressed because it is too large
Load Diff
115
assets/models/qwen38-flash-next-bare-speed.json
Normal file
115
assets/models/qwen38-flash-next-bare-speed.json
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{
|
||||||
|
"format": 1,
|
||||||
|
"source": {
|
||||||
|
"repository": "Youssofal/Qwen3.8-Flash-Next-MTPLX-Bare-Speed",
|
||||||
|
"url": "https://huggingface.co/Youssofal/Qwen3.8-Flash-Next-MTPLX-Bare-Speed/tree/74559cdf34fbfc0b593de72d17e93f37fd4f9ea7",
|
||||||
|
"revision": "74559cdf34fbfc0b593de72d17e93f37fd4f9ea7",
|
||||||
|
"base_repository": "Qwen/Qwen3.8-Flash-Next",
|
||||||
|
"base_url": "https://huggingface.co/Qwen/Qwen3.8-Flash-Next/tree/de4b8e4d43b917e7706784d8bb445c9af86a3540",
|
||||||
|
"base_revision": "de4b8e4d43b917e7706784d8bb445c9af86a3540",
|
||||||
|
"license": "Qwen Community License 1.0",
|
||||||
|
"converter": "qwen38-artifacts-v1-identity"
|
||||||
|
},
|
||||||
|
"tensor_inventory": "qwen38-flash-next-bare-speed-tensors.tsv",
|
||||||
|
"tensor_inventory_sha256": "369cdc7e53c09eaa5eff5cdcc49f0d0eab0ddc175f34965ba2ed1be2673d5858",
|
||||||
|
"config": {
|
||||||
|
"/architectures/0": "Qwen4ExpForConditionalGeneration",
|
||||||
|
"/model_type": "qwen4_exp",
|
||||||
|
"/quantization_config/bits": 4,
|
||||||
|
"/quantization_config/group_size": 64,
|
||||||
|
"/text_config/full_attention_interval": 4,
|
||||||
|
"/text_config/hc_count": 4,
|
||||||
|
"/text_config/hc_lowrank": 320,
|
||||||
|
"/text_config/hidden_size": 2560,
|
||||||
|
"/text_config/indexer_budget": 2048,
|
||||||
|
"/text_config/indexer_compress_ratio": 4,
|
||||||
|
"/text_config/indexer_head_dim": 128,
|
||||||
|
"/text_config/indexer_kv_heads": 1,
|
||||||
|
"/text_config/indexer_n_heads": 4,
|
||||||
|
"/text_config/linear_conv_kernel_dim": 4,
|
||||||
|
"/text_config/linear_key_head_dim": 128,
|
||||||
|
"/text_config/linear_num_key_heads": 16,
|
||||||
|
"/text_config/linear_num_value_heads": 48,
|
||||||
|
"/text_config/linear_value_head_dim": 128,
|
||||||
|
"/text_config/max_position_embeddings": 262144,
|
||||||
|
"/text_config/moe_intermediate_size": 640,
|
||||||
|
"/text_config/mtp_num_hidden_layers": 1,
|
||||||
|
"/text_config/ngram_size": 3,
|
||||||
|
"/text_config/ngram_vocab_size_base": 20000000,
|
||||||
|
"/text_config/num_attention_heads": 24,
|
||||||
|
"/text_config/num_experts": 512,
|
||||||
|
"/text_config/num_experts_per_tok": 10,
|
||||||
|
"/text_config/num_hidden_layers": 48,
|
||||||
|
"/text_config/num_key_value_heads": 2,
|
||||||
|
"/text_config/output_gate_type": "sigmoid",
|
||||||
|
"/text_config/partial_rotary_factor": 0.25,
|
||||||
|
"/text_config/ple_conv_kernel_size": 4,
|
||||||
|
"/text_config/ple_embed_dim": 2560,
|
||||||
|
"/text_config/rms_norm_eps": 0.000001,
|
||||||
|
"/text_config/rope_parameters/rope_theta": 10000000,
|
||||||
|
"/text_config/shared_expert_intermediate_size": 640,
|
||||||
|
"/text_config/split_ngram_parts": 128,
|
||||||
|
"/text_config/vocab_size": 248320
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"/arch_id": "qwen4-next",
|
||||||
|
"/mtp_contract/base_hidden_variant": "post_norm",
|
||||||
|
"/mtp_contract/concat_order": "embedding_hidden",
|
||||||
|
"/mtp_contract/hidden_variant": "post_norm",
|
||||||
|
"/mtp_contract/mtp_position_mode": "cache",
|
||||||
|
"/mtp_contract/mtp_quant_group_size": 64,
|
||||||
|
"/mtp_contract/mtp_quant_mode": "affine",
|
||||||
|
"/mtp_depth_max": 3,
|
||||||
|
"/mtp_sidecar": "prequantized-mlx-affine-qwen-moe-switch-mlx",
|
||||||
|
"/mtplx_version": "2.9.3",
|
||||||
|
"/public_model_id": "mtplx-flash-next-bare-speed",
|
||||||
|
"/sampler/temperature": 1.0,
|
||||||
|
"/sampler/top_k": 20,
|
||||||
|
"/sampler/top_p": 0.95
|
||||||
|
},
|
||||||
|
"representative_rows": [
|
||||||
|
{"class":"expert","file":"model-00001-of-00017.safetensors","tensor":"language_model.model.layers.0.mlp.switch_mlp.gate_proj.weight","row":0,"values":64,"bits":4,"group_size":64,"sha256":"0fe4ae597854a1483e2d63f07cada72d4656c4178e1d696ce4311b838ba05964"},
|
||||||
|
{"class":"dense","file":"model-00016-of-00017.safetensors","tensor":"language_model.model.layers.0.linear_attn.in_proj_qkv.weight","row":0,"values":64,"bits":4,"group_size":64,"sha256":"59d7d7bf84e88823704d9f7b2c84e41b46f481c658ed8a485f2fd063ecf9ca34"},
|
||||||
|
{"class":"qsa","file":"model-00016-of-00017.safetensors","tensor":"language_model.model.layers.11.self_attn.indexer.index_qk_proj.weight","row":0,"values":64,"bits":8,"group_size":64,"sha256":"c803ea77148621a5d6dfa4060a52c75f57185234a0bec4771671f69336bb8346"},
|
||||||
|
{"class":"gdn","file":"model-00016-of-00017.safetensors","tensor":"language_model.model.layers.0.linear_attn.A_log","row":0,"values":48,"sha256":"88c53a2a04bda1d96ee1ade6fa7dfa9c49d3245b1cc1e83673f02b7a36e07a85"},
|
||||||
|
{"class":"ple","file":"ngram-table.safetensors","tensor":"ngram.weight","row":0,"values":64,"bits":4,"group_size":32,"sha256":"2243dd9766046bb80d98e3baf5e59ba246958cfe4f340ebce8c1fff57a2810d9"},
|
||||||
|
{"class":"mtp","file":"mtp.safetensors","tensor":"mtp.layers.0.mlp.switch_mlp.gate_proj.weight","row":0,"values":64,"bits":2,"group_size":64,"sha256":"6293cce5e1b25a4f35cb8af46e6e13b8378ec4ca84ec7f68859066dda48049cc"}
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
{"path":"model-00001-of-00017.safetensors","role":"core","size":4666167150,"sha256":"a27232c9434b9d8961f198cf36f44e228b3f23a5f8d874ba4ca8af32a1b23ffc"},
|
||||||
|
{"path":"model-00002-of-00017.safetensors","role":"core","size":4299165712,"sha256":"6268ae80950f6b935fca672fae5aa455eb3ea4f139730e54e6e5f8581faa94dc"},
|
||||||
|
{"path":"model-00003-of-00017.safetensors","role":"core","size":4666167168,"sha256":"71a9abbd420dce567f2c06593bfee2d6cea681989d51eaef1b1c5dffd65a844b"},
|
||||||
|
{"path":"model-00004-of-00017.safetensors","role":"core","size":4299165702,"sha256":"c8112da735bb1c8dbc4757926ab8ec1eba7a707a8767c7e43c6150586cf63a4c"},
|
||||||
|
{"path":"model-00005-of-00017.safetensors","role":"core","size":4666167169,"sha256":"48258b931e7596c1b43c8b38c044060787ef6d85cca2c1935852bc962801f792"},
|
||||||
|
{"path":"model-00006-of-00017.safetensors","role":"core","size":4299165708,"sha256":"f357d2d66f7b768ebb19ba464556bbe46c572cf3cd1f8226faddf9216b150d0c"},
|
||||||
|
{"path":"model-00007-of-00017.safetensors","role":"core","size":4666167168,"sha256":"d3152e808d013e3afa4a9c391f6d8088e74a10303c89d45fb61dad7e457160f6"},
|
||||||
|
{"path":"model-00008-of-00017.safetensors","role":"core","size":4299165697,"sha256":"1d93bd4872f338fa19416bac64ebeb05aedf2721a07ac48e37c53921252c95c1"},
|
||||||
|
{"path":"model-00009-of-00017.safetensors","role":"core","size":4666167162,"sha256":"d22d4be580296e3d4fa5f4fe5902c8fc448d8204b6dcde4641f87b9c675930ca"},
|
||||||
|
{"path":"model-00010-of-00017.safetensors","role":"core","size":4299165708,"sha256":"111d0166c888cabb7d6fc19c4bb7eb42e2b51946f71b4983dd750b031755637e"},
|
||||||
|
{"path":"model-00011-of-00017.safetensors","role":"core","size":4666167159,"sha256":"73dad882cf94a5486cfe0dcda876b0f740556bc469608d2ced7a07540e699803"},
|
||||||
|
{"path":"model-00012-of-00017.safetensors","role":"core","size":4299165706,"sha256":"a6057d5a06276461760a4f4e88991550a43abdc5f8afacef06e860f5e7843393"},
|
||||||
|
{"path":"model-00013-of-00017.safetensors","role":"core","size":4666167174,"sha256":"ff25dc6e1c250c9b9ece83d59111a4c4055dad1b1f160546c614dcc17395b152"},
|
||||||
|
{"path":"model-00014-of-00017.safetensors","role":"core","size":4299165704,"sha256":"d8c9de3ae28abccc8e3da09dc92fbbed4039d6d65dabb2657edebc11b2b09652"},
|
||||||
|
{"path":"model-00015-of-00017.safetensors","role":"core","size":4666167146,"sha256":"a5438d468074c709febdeadb9f6a2db54fa9fb30a37c33de78584f28d6fa1191"},
|
||||||
|
{"path":"model-00016-of-00017.safetensors","role":"core","size":4300831084,"sha256":"4a07409bd568cd1435641495d90c805dcb0d0e5d8dc64409273d604a7d06b342"},
|
||||||
|
{"path":"model-00017-of-00017.safetensors","role":"core","size":18354282,"sha256":"9c064e0b8dc0054e2b453fe2b8450c287e1ede6e74bb74ecf5aaed1ef9271913"},
|
||||||
|
{"path":"ngram-table.safetensors","role":"ple","size":32000154008,"sha256":"af7f0880c1798e60353b07cc6b0faa0d41f78734818d858ff013ab7e3bce9de5"},
|
||||||
|
{"path":"mtp.safetensors","role":"mtp","size":1672575532,"sha256":"1bd4b2fc20a93b53f22b4cab0b14d68bc0fe666bb64e4e2f898872c30d7d26ae"},
|
||||||
|
{"path":"model.safetensors.index.json","role":"core-index","size":284868,"sha256":"81e77f5b25bb29e25e239ae2f9f324c9cada379ee600441d6c229f1d95a13443"},
|
||||||
|
{"path":"config.json","role":"config","size":227092,"sha256":"826302af9ff3293cfc9975c9a5a96546fa0aa9f0808505adfc30a62fef806965"},
|
||||||
|
{"path":"generation_config.json","role":"config","size":202,"sha256":"e70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e"},
|
||||||
|
{"path":"mtplx_runtime.json","role":"config","size":2676,"sha256":"381c7666872f878542494a48a874bb0784c72a955d18cc077324d3c9e74b8cdb"},
|
||||||
|
{"path":"chat_template.jinja","role":"tokenizer","size":8952,"sha256":"c3cf9e34abf4f9e36c2d72165aa9c132d3e2a725b6c2586aaa3a8af9d7a81041"},
|
||||||
|
{"path":"tokenizer.json","role":"tokenizer","size":12809320,"sha256":"0997f410c57a1f4e53b09e4be8f4a172d90edd9564368fb0847030937229b9f3"},
|
||||||
|
{"path":"tokenizer_config.json","role":"tokenizer","size":17928,"sha256":"b11349aafa7cdc6a320767cf7ceb29ed82f7eda5d65e8e0819e76f0ce947bf27"},
|
||||||
|
{"path":"vocab.json","role":"tokenizer","size":6722759,"sha256":"ce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003"},
|
||||||
|
{"path":"merges.txt","role":"tokenizer","size":3353259,"sha256":"a9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d"},
|
||||||
|
{"path":"LICENSE","role":"license","size":3235,"sha256":"a0dc422560841fd68e06d974907f8b4c709bca44a67daad2b528437bdf676c08"}
|
||||||
|
],
|
||||||
|
"excluded": [
|
||||||
|
{"path":"model-vision.safetensors","reason":"Vision tensors are outside the DS4Server text artifact.","size":897899145,"sha256":"5aff6983f36f52acbecc1f61f703ae7b927e74525bf3b1133ba276bb7a5b52b1"},
|
||||||
|
{"path":"preprocessor_config.json","reason":"Vision preprocessing is outside the DS4Server text artifact.","size":390,"sha256":"27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516"},
|
||||||
|
{"path":"processor_config.json","reason":"Vision preprocessing is outside the DS4Server text artifact.","size":367,"sha256":"dcc7ce0121d6d1c514804e68e5673e04c239ad2547339ea6330289d272a748f8"},
|
||||||
|
{"path":"video_preprocessor_config.json","reason":"Video preprocessing is outside the DS4Server text artifact.","size":385,"sha256":"7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13"}
|
||||||
|
]
|
||||||
|
}
|
||||||
81
docs/QWEN38_ARTIFACTS.md
Normal file
81
docs/QWEN38_ARTIFACTS.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Qwen3.8 Flash Next Bare Speed artifacts
|
||||||
|
|
||||||
|
DS4Server uses the text artifacts published at
|
||||||
|
`Youssofal/Qwen3.8-Flash-Next-MTPLX-Bare-Speed` revision
|
||||||
|
`74559cdf34fbfc0b593de72d17e93f37fd4f9ea7`. The upstream base is
|
||||||
|
`Qwen/Qwen3.8-Flash-Next` revision
|
||||||
|
`de4b8e4d43b917e7706784d8bb445c9af86a3540`, under the Qwen Community
|
||||||
|
License 1.0 included in the artifact set.
|
||||||
|
|
||||||
|
The source already separates the 71,742,682,599-byte resident text core,
|
||||||
|
32,000,154,008-byte PLE table, and 1,672,575,532-byte MTP head. DS4Server's
|
||||||
|
artifact conversion is therefore deliberately byte-preserving: the Rust tool
|
||||||
|
validates and materializes the selected files without changing their tensor
|
||||||
|
containers or numerical interpretation. The complete selected download is
|
||||||
|
105,438,842,430 bytes.
|
||||||
|
|
||||||
|
The manifest at `assets/models/qwen38-flash-next-bare-speed.json` pins every
|
||||||
|
selected file by byte size and SHA-256. Its companion TSV records all 2,527
|
||||||
|
text, PLE, and MTP tensors with their source file, name, dtype, shape,
|
||||||
|
quantization parameters, and byte range. Validation also compares the 2,466
|
||||||
|
core tensors with the source index, rejects duplicate names, invalid byte
|
||||||
|
ranges, and precision-map drift, and checks the fixed `qwen4_exp` architecture
|
||||||
|
and MTPLX serving contract before any payload is accepted.
|
||||||
|
|
||||||
|
The precision contract follows the pinned files and their per-tensor
|
||||||
|
`quantization_config`: affine 4-bit matrices use 64-weight groups; router
|
||||||
|
matrices and QSA `index_qk_proj` use the source's declared 8-bit groups; GDN
|
||||||
|
convolution and recurrent parameters, norms, hyper-connection parameters, and
|
||||||
|
the MTP mixing/norm parameters remain BF16. The MTP layer's attention and MoE
|
||||||
|
matrices remain in their published 2-, 4-, or 8-bit affine representation;
|
||||||
|
they are not up-converted to satisfy a broader prose description. The PLE
|
||||||
|
sidecar's own header pins its 4-bit rows to 32-weight groups. No Python, MLX,
|
||||||
|
llama.cpp runtime, or foreign converter is part of the tool or product.
|
||||||
|
|
||||||
|
`model-vision.safetensors` and its image/video processor configs are explicitly
|
||||||
|
excluded. The full config is retained because its `text_config` is the loader
|
||||||
|
authority. llama.cpp commit `b356fa2624643b6d5753162ae43efff8cdd4d8cb`
|
||||||
|
is not used as a converter because its reviewed path did not preserve this
|
||||||
|
separate MTP artifact.
|
||||||
|
|
||||||
|
Download and authenticate every selected file without loading tensors:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo run --release --bin qwen38-artifacts -- \
|
||||||
|
fetch assets/models/qwen38-flash-next-bare-speed.json OUTPUT_DIRECTORY
|
||||||
|
```
|
||||||
|
|
||||||
|
Interrupted downloads remain as resumable `.part` files. The fetcher uses the
|
||||||
|
manifest's immutable revision URLs, validates resumed ranges, authenticates
|
||||||
|
each completed file, and then runs the complete inventory and precision
|
||||||
|
verifier.
|
||||||
|
|
||||||
|
Verify a pinned checkout:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo run --release --bin qwen38-artifacts -- \
|
||||||
|
verify assets/models/qwen38-flash-next-bare-speed.json SOURCE_DIRECTORY
|
||||||
|
```
|
||||||
|
|
||||||
|
Materialize a clean, authenticated artifact directory:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo run --release --bin qwen38-artifacts -- \
|
||||||
|
materialize assets/models/qwen38-flash-next-bare-speed.json \
|
||||||
|
SOURCE_DIRECTORY OUTPUT_DIRECTORY
|
||||||
|
```
|
||||||
|
|
||||||
|
The output directory must not already exist. Materialization uses hard links
|
||||||
|
when possible and otherwise copies bytes, then re-runs the same full verifier
|
||||||
|
against the output.
|
||||||
|
|
||||||
|
## Verification receipt
|
||||||
|
|
||||||
|
On 2026-09-03 the pinned source passed full authentication and inventory,
|
||||||
|
precision, and representative-row verification. Two separately empty output
|
||||||
|
directories were then materialized and independently verified. Each contained
|
||||||
|
the same 29 selected files and 105,438,842,430 artifact bytes; normalized
|
||||||
|
SHA-256 listings for all 31 output files (artifacts, manifest, and inventory)
|
||||||
|
were byte-identical and had list digest
|
||||||
|
`3e0233c2356b26859de43b25b2a3df08169dd8263071432bdf2fc497da74007c`.
|
||||||
|
The six dequantized-row receipts are pinned directly in the manifest.
|
||||||
1250
tools/qwen38-artifacts.rs
Normal file
1250
tools/qwen38-artifacts.rs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user