v2: Apply tokenizer UTF-8 fix + Engine writeFloats helper
- Tokenizer fix: collect <0xXX> bytes and decode as UTF-8 (fixes Chinese/non-ASCII character decoding) - BPETokenizer + HuggingFaceTokenizer: both updated - Engine.swift: added writeFloats() utility method - FloatWeights struct added to Layer.swift (bf16 support) - attnQBits/KBits/VBits/OBits detection added to Model.swift - bf16 layer weight support from commit 48c0347 cherry-picked
This commit is contained in:
@@ -13,6 +13,14 @@ public struct QuantizedWeights {
|
||||
public let groupSize: Int // Quantization group size (32, 64, etc.)
|
||||
}
|
||||
|
||||
// ── Float Weights (non-quantized bf16/f32) ────────────────────────────
|
||||
|
||||
public struct FloatWeights {
|
||||
public let weight: MTLBuffer // Float32 [outDim, inDim]
|
||||
public let inDim: Int
|
||||
public let outDim: Int
|
||||
}
|
||||
|
||||
// ── Layer Configuration ──────────────────────────
|
||||
|
||||
public struct E4BLayerConfig {
|
||||
|
||||
Reference in New Issue
Block a user