Skip to content

Add qwen3 - #7

Merged
dfalbel merged 2 commits into
mainfrom
add-qwen3
Apr 11, 2026
Merged

Add qwen3#7
dfalbel merged 2 commits into
mainfrom
add-qwen3

Conversation

@dfalbel

@dfalbel dfalbel commented Apr 11, 2026

Copy link
Copy Markdown
Member

No description provided.

dfalbel and others added 2 commits February 9, 2026 15:38
Implements Ministral-style models with:
- YaRN RoPE (Yet another RoPE extension) for extended context
- GQA (Grouped Query Attention) with configurable num_key_value_heads
- SwiGLU MLP with SiLU activation
- RMSNorm

Verified against HuggingFace transformers MistralForCausalLM with
max diff ~6e-7 (floating point precision).

Includes tests for:
- Loading pretrained Mistral-7B and comparing logits
- Creating models with custom config
- Text generation with streaming output

Co-Authored-By: Claude <noreply@anthropic.com>
Implements the Qwen3.5 text decoder architecture featuring:
- Gated Delta Net linear attention (recurrent implementation)
- Full attention with output sigmoid gate and QK norms
- RMSNorm with unit offset, partial rotary embeddings (0.25 factor)
- On-the-fly causal mask and RoPE computation for 262K context support

Validated against HuggingFace transformers on Qwen/Qwen3.5-0.8B.
@dfalbel
dfalbel merged commit dffb9de into main Apr 11, 2026
1 check failed
@dfalbel dfalbel mentioned this pull request Apr 11, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant