根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:

```
docs(readme): 更新文档说明

- 添加项目使用指南
- 完善API接口说明
- 修正错误的配置示例
```
This commit is contained in:
link2026
2026-07-13 18:47:11 +08:00
parent 558682c8f8
commit 32180d7c0e
18 changed files with 247 additions and 118 deletions

View File

@@ -4,9 +4,10 @@ import Foundation
struct ModelManifestTests {
@Test func llmHasNineFunctionalFiles() {
// Gemma-3n E2B(text-only),9
#expect(ModelManifest.files(for: .llm).count == 9)
@Test func llmHasEightFunctionalFiles() {
// Gemma 4 E2B(text-only),8
//( tokenizer.model / special_tokens_map.json, processor_config.json)
#expect(ModelManifest.files(for: .llm).count == 8)
}
@Test func vlHasFourteenFunctionalFiles() {
@@ -14,8 +15,8 @@ struct ModelManifestTests {
}
@Test func llmTotalBytesMatchesManifest() {
// Gemma-3n-E2B-it-lm-4bit (ModelScope repo/files ,2026-06)
#expect(ModelManifest.totalBytes(for: .llm) == 2_547_095_782)
// gemma-4-e2b-it-4bit (ModelScope repo/files ,2026-07)
#expect(ModelManifest.totalBytes(for: .llm) == 3_613_528_388)
}
@Test func vlTotalBytesMatchesManifest() {
@@ -66,10 +67,20 @@ struct ModelManifestTests {
}
@Test func llmFileURLUsesModelScopeRepo() {
// ModelScope resolve/master(,302 OSS Range )
let file = ModelFile(path: "config.json", bytes: 107_207)
// ModelScope resolve/master(,302 OSS Range )
let file = ModelFile(path: "config.json", bytes: 5_996)
let url = ModelManifest.fileURL(for: .llm, file: file)
#expect(url.absoluteString ==
"https://modelscope.cn/models/mlx-community/gemma-3n-E2B-it-lm-4bit/resolve/master/config.json")
"https://modelscope.cn/models/mlx-community/gemma-4-e2b-it-4bit/resolve/master/config.json")
}
@Test func llmFileURLsAreModelScopeThenHFMirror() {
// : + hf-mirror 退 [ModelScope master, hf-mirror main]
let file = ModelFile(path: "config.json", bytes: 5_996)
let urls = ModelManifest.fileURLs(for: .llm, file: file).map(\.absoluteString)
#expect(urls == [
"https://modelscope.cn/models/mlx-community/gemma-4-e2b-it-4bit/resolve/master/config.json",
"https://hf-mirror.com/mlx-community/gemma-4-e2b-it-4bit/resolve/main/config.json",
])
}
}