Skip to content

feat: add SpatialLMQwenForCausalLM converter - #22

Open
CodeDoes wants to merge 12 commits into
aifoundry-org:etfrom
CodeDoes:clean-pr19-converter
Open

feat: add SpatialLMQwenForCausalLM converter#22
CodeDoes wants to merge 12 commits into
aifoundry-org:etfrom
CodeDoes:clean-pr19-converter

Conversation

@CodeDoes

@CodeDoes CodeDoes commented Jul 21, 2026

Copy link
Copy Markdown

Isolated SpatialLM converter that was originally part of PR #19. The reviewer asked for conversion/* to be reverted from the kernel PR, so it is split into its own PR.

What changed

  • conversion/__init__.py — add "SpatialLMQwenForCausalLM": "qwen" to TEXT_MODEL_MAP so the converter registry knows which model class to dispatch to.
  • conversion/qwen.py — add SpatialLMQwenModel class (registered as SpatialLMQwenForCausalLM). It inherits from Qwen2Model but strips three groups of 3D-point encoder tensors before writing the GGUF, so the spatial encoder weights are not serialized into the model file:
    • point_backbone.*
    • point_proj.*
    • anything starting with point_

Why it's a separate PR

PR #19 mixed kernel correctness fixes, a performance change, and a new model converter. Marty asked for conversion/* to be removed from that series; this PR satisfies that without reverting the converter work entirely. If the SpatialLM support is unwanted, close this PR — do not revert it by touching the kernel PR.

Review notes

  • The point_* filter is prefix-based; if downstream checkpoints introduce other point-encoder tensors with a different prefix, add them here explicitly.
  • model_arch = gguf.MODEL_ARCH.QWEN2 matches the base Qwen2 architecture; if SpatialLM ever diverges enough to need its own arch key, it will need a corresponding GGUF reader update on the llama.cpp side.

vidas and others added 12 commits July 13, 2026 07:35
Reorder from contiguous write to read with atomic stores.
…ecovery (aifoundry-org#15)

This PR adds Q4_K MUL_MAT to the ET (ETSOC-1) backend — a scalar kernel plus a matrix-engine kernel for prefill — improves the existing Q4_0/F16/F32 matrix-engine kernels, and fixes a Q8_0 generation regression in the uberkernel path. Verified on Llama-3.2-1B-Instruct on ETSOC-1 with flash attention enabled.
…sor-engine & vectorized dots, plus uberkernel support (aifoundry-org#16)

This PR adds full ET-backend support for the Q2_K, Q3_K, Q5_K, and Q6_K super-block quantizations (previously only Q4_0/Q8_0/Q4_K existed), and substantially improves generation throughput across all K-quants — including the pre-existing Q4_K — by (a) vectorizing the generation dot product and (b) enabling the K-quant matmuls to run inside the uberkernel. For prefill, every K-quant gets a tensor-unit (matrix-engine) kernel delivering very large token/sec.

Everything is validated on test-backend-ops (MUL_MAT + GET_ROWS) and by coherent end-to-end generation on Llama-3.2-1B models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants