Skip to content

Commit bcdecc8

Browse files
author
Aegis-AI
committed
fix: revert layers to internal to fix public-property-of-internal-type error
Qwen3TransformerBlock and Qwen3MoeDecoderLayer are internal types. Declaring public let layers of those types violates Swift's access control rules. callCapturing() is defined in the same module so can access internal layers directly — no need to expose them publicly.
1 parent 5cf3709 commit bcdecc8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Libraries/MLXLLM/Models/Qwen3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public class Qwen3ModelInner: Module, LayerPartitionable {
147147
public var totalLayerCount: Int { layers.count }
148148
@ModuleInfo(key: "embed_tokens") public var embedTokens: Embedding
149149

150-
public let layers: [Qwen3TransformerBlock]
150+
let layers: [Qwen3TransformerBlock]
151151
let norm: RMSNorm
152152

153153
public init(_ args: Qwen3Configuration) {

Libraries/MLXLLM/Models/Qwen3MoE.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public class Qwen3MoEModelInner: Module, LayerPartitionable, StreamableMoE {
198198

199199
@ModuleInfo(key: "embed_tokens") public var embedTokens: Embedding
200200

201-
public let layers: [Qwen3MoeDecoderLayer]
201+
let layers: [Qwen3MoeDecoderLayer]
202202
let norm: RMSNorm
203203
let args: Qwen3MoEConfiguration
204204

0 commit comments

Comments
 (0)