1- # GAME ggml backend
1+ # GAME ggml backend · GAME ggml 后端
22
33Native C++ inference for the [ GAME] ( https://github.com/openvpi/GAME ) singing-voice-to-MIDI model, built on
44[ ggml] ( https://github.com/ggerganov/ggml ) . Runs on CPU, Metal (default on
55Apple Silicon), CUDA, or Vulkan. Drop-in replacement for
66` python infer.py extract ` with no Python dependency at runtime.
77
8- ## Highlights
8+ 基于 [ ggml] ( https://github.com/ggerganov/ggml ) 的 [ GAME] ( https://github.com/openvpi/GAME ) 歌声转 MIDI 模型原生 C++ 推理实现,支持 CPU、Metal(Apple Silicon 默认)、CUDA、Vulkan;是 ` python infer.py extract ` 的运行时零 Python 依赖替代品。
9+
10+ ## Highlights · 特性亮点
911
1012- ** End-to-end CLI** — WAV in, MIDI/TXT/CSV out (mirrors Python ` extract ` ).
1113- ** Small footprint** — ~ 50 MB GGUF for the 1.0-medium checkpoint, ~ 50 M params.
@@ -16,7 +18,7 @@ Apple Silicon), CUDA, or Vulkan. Drop-in replacement for
1618- ** Parity-tested** — full pipeline output matches the PyTorch reference bit-for-bit
1719 when the same RNG numbers are injected.
1820
19- ## Architecture
21+ ## Architecture · 架构
2022
2123```
2224waveform (44100 Hz mono)
@@ -40,7 +42,7 @@ waveform (44100 Hz mono)
4042 Gaussian-blurred pitch decode → notes (offset, duration, pitch, voiced)
4143```
4244
43- ## Build
45+ ## Build · 构建
4446
4547``` bash
4648cmake -S ggml_backend -B ggml_backend/build \
@@ -59,7 +61,7 @@ Options:
5961| ` GAME_GGML_BUILD_CLI ` | ` ON ` | Build ` game_ggml_cli ` |
6062| ` GAME_GGML_BUILD_TESTS ` | ` OFF ` | Build GoogleTest suite |
6163
62- ## Convert a PyTorch checkpoint
64+ ## Convert a PyTorch checkpoint · 转换 PyTorch 权重
6365
6466``` bash
6567pip install -r ggml_backend/scripts/requirements.txt
@@ -78,7 +80,7 @@ Inspect the result:
7880./ggml_backend/build/bin/game_ggml_cli inspect ggml_backend/assets/game_small.gguf
7981```
8082
81- ## Run inference
83+ ## Run inference · 运行推理
8284
8385``` bash
8486./ggml_backend/build/bin/game_ggml_cli extract input.wav \
@@ -107,7 +109,7 @@ Inspect the result:
107109| ` --round-pitch ` | ` --round-pitch ` |
108110| ` --rng-replay <path> ` | * (new)* — replay D3PM random numbers from a file for bit-exact parity with PyTorch |
109111
110- ## Performance
112+ ## Performance · 性能
111113
112114Measured on Apple M4 (macOS, 16-core Apple Silicon), 3 runs per side under
113115` /usr/bin/time -l ` , fresh subprocess each run (so peak RSS is clean). Input:
@@ -161,7 +163,7 @@ estimator ~0.06 s (~ 6%) x_est + regions → notes (4× JEBF + joint attn)
161163Segmenter dominates because D3PM loops it ` --nsteps ` times. Default ` 1 `
162164keeps it cheap; bump to ` 4 ` or ` 8 ` for higher quality at linear cost.
163165
164- ## Reproducing the benchmark
166+ ## Reproducing the benchmark · 复现基准测试
165167
166168``` bash
167169# 1. Resample to 44.1 kHz / mono (if not already)
@@ -186,7 +188,7 @@ python3 ggml_backend/scripts/benchmark_align.py /tmp/28_44100.wav \
186188 -l zh -o /tmp/bench_out --runs 3
187189```
188190
189- ## Using as a third-party library
191+ ## Using as a third-party library · 作为第三方库使用
190192
191193``` cmake
192194add_subdirectory(path/to/GAME/ggml_backend)
@@ -223,7 +225,7 @@ include any ggml header.
223225See [ ` examples/external_consumer/ ` ] ( examples/external_consumer/ ) for a minimal
224226standalone CMake project that builds against the library.
225227
226- ## Tests
228+ ## Tests · 测试
227229
228230``` bash
229231ctest --test-dir ggml_backend/build --output-on-failure
@@ -247,7 +249,7 @@ The suite has 37 tests covering:
247249Reference dumps are generated by ` python scripts/dump_reference.py --category all ` .
248250Dumps are gitignored — regenerate them as part of CI.
249251
250- ## Known limitations (v1)
252+ ## Known limitations (v1) · 已知限制(v1)
251253
252254- ** 44100 Hz mono WAV only** — other sample rates raise ` InvalidWav ` . Resampling
253255 is deliberately out-of-scope to keep the footprint small.
@@ -261,7 +263,7 @@ Dumps are gitignored — regenerate them as part of CI.
261263- ** Metal FP32 precision** — expected ~ 1e-3 per matmul; at boundary decoding
262264 this can flip one frame out of every few hundred vs the CPU reference.
263265
264- ## Dependencies
266+ ## Dependencies · 依赖
265267
266268Everything is fetched at configure time by CMake; nothing is vendored. Source
267269trees live under ` build/_deps/<name>-src/ ` after the first configure.
@@ -277,7 +279,7 @@ Each upstream LICENSE file is preserved under `build/_deps/<name>-src/LICENSE*`
277279after download. To update a dependency, change its ` GIT_TAG ` in
278280` cmake/Dependencies.cmake ` and reconfigure.
279281
280- ## License
282+ ## License · 许可
281283
282284MIT — same as the parent [ GAME project] ( https://github.com/openvpi/GAME ) . Redistributions should
283285also carry the upstream license notices listed in the table above.
0 commit comments