Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## Unreleased

### Inkling 2 Mini
- **Tool calls, reasoning and agent turns.** Inkling 2 serves through `/v1/chat/completions` and `/v1/messages`, with:
- its message frames split into reasoning, text and JSON tool calls (#686);
- a second agent turn that reuses the first turn's prompt cache, with window and conv states restored bit for bit (#712).
- **`--mtp` drafts with the checkpoint's DSpark head** (`mtp.safetensors`, #728). On `mlx-community/Inkling-2-Mini-oQ3e-mtp` (M4 Pro, 24 GB, 256 tokens), decode goes 28.0 → 49.8 tok/s on code at T 0 and 26.8 → 38.4 at T 0.7, and stays even with plain decoding on prose. Each round's draft depth follows how many drafts were accepted so far.
- **`basalt fit` and Compose.**
- `basalt fit` ranks the oQ2.5e and oQ3e packs.
- New Compose profiles on oQ3e: `24gb-agent-inkling` (32K context), `36gb-agent-inkling` (64K) and `48gb-agent-inkling` (128K).
- The oQ4e and mlx-community 4-bit packs carry per-expert `global_scale`, and the original checkpoint is ModelOpt. They wait for #677 gaps 2 and 3.

### Adapters
- PEFT LoRA adapters (`adapter_config.json` + `adapter_model.safetensors`, the format of the `harness-hub` adapters) load through `--adapter name=dir`, `X-Basalt-Adapter` and `adapter_apply`. This covers VLM-style keys and rsLoRA. DoRA, `modules_to_save` and per-layer rank patterns are refused with the field named (#730).

### Fixes
- Qwen 3.5/3.8 checkpoints that load through the multimodal path (`model_type: qwen3_5`) ignored a YaRN `rope_parameters` entry. They now apply it like the text path (#731).
- A Gemma 4 config with a RoPE scaling type is refused at load, instead of rotating the dimensions p-RoPE leaves unrotated (#731).

## 0.12.0 — 2026-11-20

### Upgrading from 0.11.0
Expand Down
34 changes: 34 additions & 0 deletions Sources/BasaltCore/ComposeProfileCatalog+Inkling.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Foundation

extension ComposeProfileCatalog {
static let inklingAgents: [V22ComposeSpecialist] = [
inklingAgent(tier: .gb24, id: "24gb-agent-inkling", pack: "mlx-community/Inkling-2-Mini-oQ3e-mtp", peakGB: 16.5, context: "32K"),
inklingAgent(tier: .gb36, id: "36gb-agent-inkling", pack: "mlx-community/Inkling-2-Mini-oQ3e-mtp", peakGB: 17.6, context: "64K"),
inklingAgent(tier: .gb48, id: "48gb-agent-inkling", pack: "mlx-community/Inkling-2-Mini-oQ3e-mtp", peakGB: 20.2, context: "128K"),
]

private static func inklingAgent(tier: ComposeMemoryTier, id: String, pack: String, peakGB: Double, context: String) -> V22ComposeSpecialist {
V22ComposeSpecialist(
id: id,
tier: tier,
archetype: .codingAgent,
primaryModel: pack,
estimatedPeakGB: peakGB,
badges: ["Inkling 2", "Tool calls", context],
yaml: """
version: "2.2"
name: \(id)
memory: auto
mcp:
enabled: true
rest: true
models:
agent:
source: \(pack)
pipeline:
answer:
model: agent
"""
)
}
}
2 changes: 1 addition & 1 deletion Sources/BasaltCore/ComposeProfileCatalog+V22.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension ComposeProfileCatalog {
make24GBVideoLingBot(),
make36GBStudioEdit2K(),
make64GBClusterDiLoCo(),
]
] + inklingAgents

public static var v22YAML: [String: String] {
Dictionary(uniqueKeysWithValues: v22Specialists.map { ($0.id, $0.yaml) })
Expand Down
22 changes: 21 additions & 1 deletion Sources/BasaltCore/ModelDatabase.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

public enum ModelFamily: String, Codable, Sendable {
case qwen, gemma, llama, mistral, deepseek, muse
case qwen, gemma, llama, mistral, deepseek, muse, inkling
}

public enum ModelTask: String, Codable, Sendable {
Expand Down Expand Up @@ -245,6 +245,26 @@ public struct ModelDatabase: Sendable {
ramMB: 20200, contextWindow: 131072, quantization: "oQ4e", quality: 0.96,
totalParameters: 30.0, activeParameters: 30.0)
),
ModelDefinition(
id: "mlx-community/Inkling-2-Mini-oQ2.5e-mtp",
name: "Inkling 2 Mini (oQ2.5e, DSpark MTP)",
family: .inkling,
task: .code,
modality: .text,
spec: ModelDefinition.Spec(
ramMB: 11010, contextWindow: 262144, quantization: "oQ2.5e", quality: 0.89,
totalParameters: 26.0, activeParameters: 5.4)
),
ModelDefinition(
id: "mlx-community/Inkling-2-Mini-oQ3e-mtp",
name: "Inkling 2 Mini (oQ3e, DSpark MTP)",
family: .inkling,
task: .code,
modality: .text,
spec: ModelDefinition.Spec(
ramMB: 13040, contextWindow: 262144, quantization: "oQ3e", quality: 0.91,
totalParameters: 26.0, activeParameters: 5.4)
),
ModelDefinition(
id: "meta-models/Muse-Glimmer-30B",
name: "Meta Muse Glimmer 30B (Base BF16)",
Expand Down
2 changes: 1 addition & 1 deletion Tests/BasaltTests/ComposeProfilesMatrixTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct ComposeProfilesMatrixTests {
let bundledKeys = ComposeFile.bundled.keys.sorted()
#expect(ComposeProfileCatalog.flux3Combinations.count == 5)
#expect(ComposeProfileCatalog.videoCombinations.count == 5)
#expect(ComposeProfileCatalog.v22Specialists.count == 6)
#expect(ComposeProfileCatalog.v22Specialists.count == 9)
#expect(bundledKeys.count == 91 + 4 * 13 + 3 + 5 + 5 + ComposeProfileCatalog.v22Specialists.count)
for key in bundledKeys {
let spec = try ComposeFile.load(key)
Expand Down
30 changes: 30 additions & 0 deletions Tests/BasaltTests/InklingCatalogTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Foundation
import Testing
@testable import BasaltCore

@Suite("Inkling 2 P4: basalt fit ranks the oQ packs and Compose resolves the agent profiles per memory tier (#650)")
struct InklingCatalogTests {
static func gib(_ value: Double) -> ByteCount { ByteCount(Int64(value * 1_073_741_824)) }

@Test("basalt fit knows the oQ2.5e and oQ3e packs (oQ4e waits for #677 gap 2); oQ3e is a good fit on a 24 GB Mac's 18 GiB working set and a perfect one at 32 GiB")
func fitCatalog() throws {
#expect(ModelDatabase.models(for: ModelFamily.inkling).map(\.quantization) == ["oQ2.5e", "oQ3e"])
let oQ3e = try #require(ModelDatabase.find(id: "mlx-community/Inkling-2-Mini-oQ3e-mtp"))
#expect(oQ3e.isMoE && oQ3e.task == .code)
#expect(FitScorer.fitLevel(model: oQ3e, available: Self.gib(18), ramFit: 0.6) == .good)
#expect(FitScorer.fitLevel(model: oQ3e, available: Self.gib(32), ramFit: 0.8) == .perfect)
}

@Test("Each Inkling agent profile resolves to its pack and tier, and parses with no ComposeSpec issues",
arguments: [
("24gb-agent-inkling", "mlx-community/Inkling-2-Mini-oQ3e-mtp", ComposeMemoryTier.gb24),
("36gb-agent-inkling", "mlx-community/Inkling-2-Mini-oQ3e-mtp", .gb36),
("48gb-agent-inkling", "mlx-community/Inkling-2-Mini-oQ3e-mtp", .gb48),
])
func composeProfiles(id: String, pack: String, tier: ComposeMemoryTier) throws {
let profile = try #require(ComposeProfileCatalog.resolve(id: id))
#expect(profile.primaryModel == pack && profile.tier == tier && profile.archetype == .codingAgent)
#expect(profile.estimatedResidentGB <= Double(tier.nominalGB) * 0.7)
#expect(profile.yaml.contains("source: \(pack)"))
}
}