Initial commit: E4B-MarkBase model integration with passing tests
CI / build-and-test (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
- E4B-MarkBase model (42 layers, 4.4GB) loaded successfully - All Phase 1-6 tests passed (model loading, forward pass, vision/audio towers, token generation, performance) - All stress tests passed (5/5 in 127.6s) - Concurrent inference - Memory stress (67.5 tok/s, 0 NaN) - Continuous generation - Batch processing - Long-running stability - Swift Metal inference engine with multimodal support
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import XCTest
|
||||
@testable import MarkBase
|
||||
|
||||
final class RouterBitsCheckTest: XCTestCase {
|
||||
|
||||
func testRouterBitsDetection() throws {
|
||||
print("\n═══════════════════════════════════════")
|
||||
print(" Router Bits Detection Test")
|
||||
print("═══════════════════════════════════════\n")
|
||||
|
||||
let modelDir = "/Users/accusys/MarkBaseEngine/models/gemma-4-26b-a4b-it-4bit"
|
||||
|
||||
print("Loading model...")
|
||||
fflush(stdout)
|
||||
let engine = try MarkBaseEngine(autoCompile: true)
|
||||
let model = try E4BModel(modelDir: modelDir, engine: engine, maxContextLength: 32)
|
||||
|
||||
print("\nChecking router weights for each layer:")
|
||||
fflush(stdout)
|
||||
|
||||
for layerIdx in 0..<min(5, model.layers.count) {
|
||||
let layer = model.layers[layerIdx]
|
||||
|
||||
if let router = layer.routerProj {
|
||||
print(" Layer \(layerIdx) router:")
|
||||
print(" bits: \(router.bits)")
|
||||
print(" inDim: \(router.inDim)")
|
||||
print(" outDim: \(router.outDim)")
|
||||
print(" groupSize: \(router.groupSize)")
|
||||
print(" weight buffer size: \(router.weight.length)")
|
||||
print(" scales buffer size: \(router.scales.length)")
|
||||
} else {
|
||||
print(" Layer \(layerIdx): routerProj is nil!")
|
||||
}
|
||||
fflush(stdout)
|
||||
}
|
||||
|
||||
print("\n═══════════════════════════════════════")
|
||||
print("✓ Router bits check completed")
|
||||
print("═══════════════════════════════════════\n")
|
||||
fflush(stdout)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user