#!/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!")