Repository navigation
Fix #588: forged Qwen models as local inference providers - #615
Conversation
- selectLocalModel() now returns continuum-ai/qwen3.5-4b-code-forged - Model registry entries added for 4B (GGUF) and 27B (safetensors) - Local personas (Helper, Teacher, CodeReview) use forged models - BLOCKED: need GGUF published to HF before this works end-to-end
Quick path: hardcode forged models in both TS and Rust registries. Proper unification tracked in #614. Models added: - continuum-ai/qwen3.5-4b-code-forged (2.6GB GGUF, 70%+ HumanEval) - continuum-ai/qwen3.5-27b-code-forged (17GB, Sonnet-level) Local personas (Helper, Teacher, CodeReview) now configured to use forged models. selectLocalModel() returns forged models by VRAM tier.
There was a problem hiding this comment.
Pull request overview
This PR adds two “forged” Qwen models as Candle (local) inference options across the Rust model registry, the TS ai/model/list command catalog, and the seeded local personas/model selection logic.
Changes:
- Added
continuum-ai/qwen3.5-4b-code-forgedandcontinuum-ai/qwen3.5-27b-code-forgedto the Rustmodel_registry.json. - Added the same forged models to the TS
ai/model/listcatalog. - Updated seeded local personas and
selectLocalModel()to prefer forged models by VRAM tier.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/workers/continuum-core/src/inference/model_registry.json | Registers forged Qwen models in the Rust Candle model registry. |
| src/scripts/seed/personas.ts | Switches local personas + selectLocalModel() to use forged Qwen models. |
| src/commands/ai/model/list/shared/ModelListCommand.ts | Adds forged Qwen models to the TS model list output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { uniqueId: generateUniqueId('Teacher'), displayName: 'Teacher AI', provider: 'candle', type: 'persona', voiceId: '75', minVramGB: 5, modelId: 'unsloth/Llama-3.1-8B-Instruct' }, | ||
| { uniqueId: generateUniqueId('CodeReview'), displayName: 'CodeReview AI', provider: 'candle', type: 'persona', voiceId: '100', minVramGB: 9, modelId: 'coder' }, | ||
| { uniqueId: generateUniqueId('Helper'), displayName: 'Helper AI', provider: 'candle', type: 'persona', voiceId: '50', minVramGB: 3, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, | ||
| { uniqueId: generateUniqueId('Teacher'), displayName: 'Teacher AI', provider: 'candle', type: 'persona', voiceId: '75', minVramGB: 5, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, |
There was a problem hiding this comment.
Teacher and Helper now both point at the same 4B model, but Teacher has a higher minVramGB and the allocator increments vramAllocated per persona. On an 8GB GPU (6GB usable after reserve), Helper (3GB) will be included and Teacher (5GB) will be skipped even though it would reuse the already-loaded model. Consider aligning minVramGB for personas that share a model, or adjusting allocation to account for shared modelId so VRAM isn’t double-counted.
| { uniqueId: generateUniqueId('Teacher'), displayName: 'Teacher AI', provider: 'candle', type: 'persona', voiceId: '75', minVramGB: 5, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, | |
| { uniqueId: generateUniqueId('Teacher'), displayName: 'Teacher AI', provider: 'candle', type: 'persona', voiceId: '75', minVramGB: 3, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, |
| return 'unsloth/Llama-3.2-3B-Instruct'; | ||
| // Use our forged Qwen models — the whole point of the forge pipeline | ||
| if (vramGB >= 32) return 'continuum-ai/qwen3.5-27b-code-forged'; // 17GB fp16, best quality | ||
| if (vramGB >= 16) return 'continuum-ai/qwen3.5-27b-code-forged'; // fits in 16GB with 4-bit |
There was a problem hiding this comment.
selectLocalModel() returns the 27B model for vramGB >= 16, but the registry entry for that model is min_memory_gb: 17 (and the comment here says 17GB fp16). This will select a model that cannot fit on 16GB cards. Adjust thresholds to match actual minimums (and consider basing selection on usableVram after the system reserve, since the function’s doc comment says “after system reserve”).
| if (vramGB >= 16) return 'continuum-ai/qwen3.5-27b-code-forged'; // fits in 16GB with 4-bit | |
| if (vramGB >= 17) return 'continuum-ai/qwen3.5-27b-code-forged'; // meets 17GB minimum (e.g., 4-bit/optimized) |
| "continuum-ai/qwen3.5-4b-code-forged": { | ||
| "repo": "continuum-ai/qwen3.5-4b-code-forged-GGUF", | ||
| "format": "gguf", | ||
| "architecture": "qwen3", | ||
| "description": "4B code model, forged with experiential plasticity. 70%+ HumanEval. 2.6GB Q4_K_M.", | ||
| "min_memory_gb": 3, | ||
| "chat_template": "qwen2" |
There was a problem hiding this comment.
These registry keys include '/' (full HuggingFace IDs), but resolve_model_id() in the Candle adapter returns early for any requested model containing '/' and will not consult model_registry.json. As a result, the repo mapping here (notably the ...-GGUF repo) will be ignored and Candle will try to download continuum-ai/qwen3.5-4b-code-forged instead. Use a slashless alias key (and reference that alias from TS) or update resolve_model_id() to check the registry before the early return.
| { uniqueId: generateUniqueId('CodeReview'), displayName: 'CodeReview AI', provider: 'candle', type: 'persona', voiceId: '100', minVramGB: 9, modelId: 'coder' }, | ||
| { uniqueId: generateUniqueId('Helper'), displayName: 'Helper AI', provider: 'candle', type: 'persona', voiceId: '50', minVramGB: 3, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, | ||
| { uniqueId: generateUniqueId('Teacher'), displayName: 'Teacher AI', provider: 'candle', type: 'persona', voiceId: '75', minVramGB: 5, modelId: 'continuum-ai/qwen3.5-4b-code-forged' }, | ||
| { uniqueId: generateUniqueId('CodeReview'), displayName: 'CodeReview AI', provider: 'candle', type: 'persona', voiceId: '100', minVramGB: 9, modelId: 'continuum-ai/qwen3.5-27b-code-forged' }, |
There was a problem hiding this comment.
CodeReview is configured with minVramGB: 9, but the selected model is continuum-ai/qwen3.5-27b-code-forged (described as needing ~17GB). With the current allocator logic, this persona can be selected on hardware that cannot actually run the model, leading to load failures or severe fallback behavior. Increase minVramGB to match the model’s true minimum (or switch this persona to the 4B forged model for smaller GPUs).
| { uniqueId: generateUniqueId('CodeReview'), displayName: 'CodeReview AI', provider: 'candle', type: 'persona', voiceId: '100', minVramGB: 9, modelId: 'continuum-ai/qwen3.5-27b-code-forged' }, | |
| { uniqueId: generateUniqueId('CodeReview'), displayName: 'CodeReview AI', provider: 'candle', type: 'persona', voiceId: '100', minVramGB: 17, modelId: 'continuum-ai/qwen3.5-27b-code-forged' }, |
Changes
Our forged models now appear as local inference options:
continuum-ai/qwen3.5-4b-code-forged(2.6GB GGUF, 70%+ HumanEval)continuum-ai/qwen3.5-27b-code-forged(17GB, Sonnet-level)Added to both Rust model_registry.json and TS model list command.
Local personas (Helper, Teacher, CodeReview) configured to use them.
selectLocalModel()returns forged models by VRAM tier.Proper unification (single source of truth) tracked in #614.
Test
./jtag ai/model/listshows both forged models as candle providers