Repository navigation
Qwen3.5 GGUF support, repo @revision/:variant specs, benchmark_generate, and qwen3.5-4b-gguf modeltests - #99
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
models/transformer,tokenizers/hftokenizer):attention.key_length(HeadDim),rope.dimension_count(partial RoPEPartialRotaryFactor),full_attention_interval, andssm.*(conv_kernel,state_size,group_count,time_step_rank,inner_size) metadata inapplyGGUFMetadata, and recognizes"qwen35"inCreateGoMLXModelanddetectCausalMask.blk.{N}.attn_qkv.{weight,bias}fused aslinear_attn/in_proj_qkvon Gated DeltaNet layers, mapsattn_gate,ssm_alpha,ssm_beta,ssm_out,ssm_conv1d,ssm_a,ssm_dt.bias, andssm_norm, reshapes 2Dssm_conv1d.weightto[convDim, 1, K], convertsssm_a(-exp(A_log)) toA_log(log(-ssm_a)), and setsRMSNormOffset(0.0)+WithLinearTiledKVHeads(true)for GGUF Qwen3.5.qwen35andqwen2pre-tokenizer (Split+ByteLevel(use_regex=false)+NFC) handling inhftokenizer.NewFromGGUF.<owner>/<repo>[@<revision>][:<variant>]repo specs (hub,models/gguf,models/transformer,cmd/hubinfo,examples/msmarco/benchmark_embed):hub.ParseRepoSpec,Repo.Revision(),Repo.Variant(),Repo.WithVariant(...), andgguf.SelectGGUFFileForVariant.examples/dolly/benchmark_generate,examples/msmarco/benchmark_embed):-saveand-teacher_forcedbenchmarking flags and renamedexamples/dolly/browse→examples/dolly/benchmark_generateacross docs.examples/msmarco/benchmark_embed.modeltests& Docs (modeltests/,README.md,docs/ModelTests.md):modeltests/internal/generators/yzmawith-task=generateand added goldenmodeltests/testdata/qwen3.5-4b-gguf/spec.json(Q4_0, generated fromllama.cpp).README.mdwith Models Known to Work and How To Specify A Model.Verification
go test -short -p 1 ./...passes.TestGGUFQwen35EndToEnd&TestGGUFQwen35RealParity(0.99090 logit cosine similarity and exact tokenization vsQwen/Qwen3.5-4BSafetensors) pass.GOEXPERIMENT=simd go test -v -p=1 ./modeltests -modeltests -run TestModels/qwen3.5-4b-gguf -backends="cuda;xla:cuda;go":tokenize: PASScuda: PASS (infer=13.7s,Peak RSS=3.0 GiB,kvcache_parity=8/8,tf=283/288 toks)xla:cuda: PASS (infer=1m18s,Peak RSS=7.8 GiB,kvcache_parity=8/8,tf=283/288 toks)go: PASS (infer=1m,Peak RSS=9.3 GiB,kvcache_parity=8/8,tf=286/288 toks)