Initial commit: E4B-MarkBase model integration with passing tests
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:
MarkBase Admin
2026-06-23 18:12:35 +08:00
commit ac75faa0cc
301 changed files with 63426 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env swift
import Foundation
print("=== Test: Load 26B-Standard Model ===")
print("Start time: \(Date())")
fflush(stdout)
// We need to import G12B from the package
// This requires running from the package directory
// For now, let's just time loading the safetensors file
let modelDir = "/Users/accusys/MarkBaseEngine/models/gemma-4-26b-standard"
let modelPath = "\(modelDir)/model.safetensors"
print("Loading safetensors from \(modelPath)")
let loadStart = Date()
let fileSize = (try? FileManager.default.attributesOfItem(atPath: modelPath)[.size] as? Int64) ?? 0
print("File size: \(Double(fileSize) / 1e9) GB")
fflush(stdout)
// Just reading the file
let fileHandle = try FileHandle(forReadingFrom: URL(fileURLWithPath: modelPath))
let headerSize = 8
let headerData = fileHandle.readData(ofLength: headerSize)
let numBytes = headerData.withUnsafeBytes { $0.load(as: UInt64.self) }
print("Header says tensor data starts at byte \(numBytes)")
fflush(stdout)
print("Time to read header: \(Date().timeIntervalSince(loadStart))s")
print("Test completed!")