```
feat(iOS): 更新MNN后端模型配置优化性能 将MNN主模型从Qwen3.5-4B(~2.64GiB)降级为Qwen3.5-2B(~1.1GiB),因为4B版本 实测运行过慢,影响用户体验。iPhone17+/SME2设备使用2B模型,保留MLX 兜底方案用于模拟器和备用场景,确保AI推理性能和存储效率的平衡。 ```
This commit is contained in:
@@ -13,19 +13,19 @@ struct ModelManifestTests {
|
||||
}
|
||||
|
||||
@Test func llmTotalBytesMatchesManifest() {
|
||||
#expect(ModelManifest.totalBytes(for: .llm) == 3_061_129_077)
|
||||
#expect(ModelManifest.totalBytes(for: .llm) == 1_749_079_691)
|
||||
}
|
||||
|
||||
@Test func vlTotalBytesMatchesManifest() {
|
||||
#expect(ModelManifest.totalBytes(for: .vl) == 3_109_729_929)
|
||||
}
|
||||
|
||||
@Test func mnnHasSevenFunctionalFiles() {
|
||||
#expect(ModelManifest.files(for: .mnnLLM).count == 7)
|
||||
@Test func mnnHasSixFunctionalFiles() {
|
||||
#expect(ModelManifest.files(for: .mnnLLM).count == 6)
|
||||
}
|
||||
|
||||
@Test func mnnTotalBytesMatchesManifest() {
|
||||
#expect(ModelManifest.totalBytes(for: .mnnLLM) == 2_836_770_850)
|
||||
#expect(ModelManifest.totalBytes(for: .mnnLLM) == 1_185_759_005)
|
||||
}
|
||||
|
||||
@Test func mnnHasEssentialRuntimeFiles() {
|
||||
@@ -39,7 +39,7 @@ struct ModelManifestTests {
|
||||
@Test func mnnFileURLUsesRepoPath() {
|
||||
let file = ModelFile(path: "config.json", bytes: 652)
|
||||
let url = ModelManifest.fileURL(for: .mnnLLM, file: file)
|
||||
#expect(url.absoluteString == "https://file.myv0.com/Qwen3.5-4B-MNN/config.json")
|
||||
#expect(url.absoluteString == "https://file.myv0.com/Qwen3.5-2B-MNN/config.json")
|
||||
}
|
||||
|
||||
@Test func excludesReadmeAndGitattributes() {
|
||||
@@ -62,8 +62,8 @@ struct ModelManifestTests {
|
||||
}
|
||||
|
||||
@Test func fileURLIsBaseSlashRepoSlashPath() {
|
||||
let file = ModelFile(path: "config.json", bytes: 3_366)
|
||||
let file = ModelFile(path: "config.json", bytes: 3_113)
|
||||
let url = ModelManifest.fileURL(for: .llm, file: file)
|
||||
#expect(url.absoluteString == "https://file.myv0.com/Qwen3.5-4B-4bit/config.json")
|
||||
#expect(url.absoluteString == "https://file.myv0.com/Qwen3.5-2B-4bit/config.json")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user