gmlx 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. gmlx-0.0.1/CHANGELOG.md +9 -0
  2. gmlx-0.0.1/CONTRIBUTING.md +77 -0
  3. gmlx-0.0.1/LICENSE +112 -0
  4. gmlx-0.0.1/MANIFEST.in +11 -0
  5. gmlx-0.0.1/PKG-INFO +515 -0
  6. gmlx-0.0.1/README.md +448 -0
  7. gmlx-0.0.1/bench/README.md +142 -0
  8. gmlx-0.0.1/bench/example.json +44 -0
  9. gmlx-0.0.1/bench/merge.py +55 -0
  10. gmlx-0.0.1/bench/patches/ds4-ignore-eos.patch +77 -0
  11. gmlx-0.0.1/bench/plot-bench.py +883 -0
  12. gmlx-0.0.1/bench/serve-bench.py +2112 -0
  13. gmlx-0.0.1/docs/README.md +117 -0
  14. gmlx-0.0.1/docs/adding-architectures.md +114 -0
  15. gmlx-0.0.1/docs/arch-coverage.md +47 -0
  16. gmlx-0.0.1/docs/assets/demo.tape +33 -0
  17. gmlx-0.0.1/docs/assets/perf/fleet-ratio-dark.svg +104 -0
  18. gmlx-0.0.1/docs/assets/perf/fleet-ratio.svg +104 -0
  19. gmlx-0.0.1/docs/assets/perf/mtp-lift-dark.svg +92 -0
  20. gmlx-0.0.1/docs/assets/perf/mtp-lift.svg +92 -0
  21. gmlx-0.0.1/docs/assets/perf/per-model/deepseek-v4-flash-antirez-iq2xxs-panels-dark.svg +93 -0
  22. gmlx-0.0.1/docs/assets/perf/per-model/deepseek-v4-flash-antirez-iq2xxs-panels.svg +93 -0
  23. gmlx-0.0.1/docs/assets/perf/per-model/deepseek-v4-flash-unsloth-udiq3xxs-panels-dark.svg +82 -0
  24. gmlx-0.0.1/docs/assets/perf/per-model/deepseek-v4-flash-unsloth-udiq3xxs-panels.svg +82 -0
  25. gmlx-0.0.1/docs/assets/perf/per-model/dolphin3-llama3.1-8b-q6k-panels-dark.svg +72 -0
  26. gmlx-0.0.1/docs/assets/perf/per-model/dolphin3-llama3.1-8b-q6k-panels.svg +72 -0
  27. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-12b-q6k-panels-dark.svg +88 -0
  28. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-12b-q6k-panels.svg +88 -0
  29. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-26b-a4b-q6k-panels-dark.svg +90 -0
  30. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-26b-a4b-q6k-panels.svg +90 -0
  31. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-31b-q6k-panels-dark.svg +101 -0
  32. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-31b-q6k-panels.svg +101 -0
  33. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-e2b-q6kxl-panels-dark.svg +72 -0
  34. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-e2b-q6kxl-panels.svg +72 -0
  35. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-e4b-q6k-panels-dark.svg +72 -0
  36. gmlx-0.0.1/docs/assets/perf/per-model/gemma-4-e4b-q6k-panels.svg +72 -0
  37. gmlx-0.0.1/docs/assets/perf/per-model/gpt-oss-120b-heretic-mxfp4-panels-dark.svg +74 -0
  38. gmlx-0.0.1/docs/assets/perf/per-model/gpt-oss-120b-heretic-mxfp4-panels.svg +74 -0
  39. gmlx-0.0.1/docs/assets/perf/per-model/gpt-oss-20b-mxfp4-panels-dark.svg +70 -0
  40. gmlx-0.0.1/docs/assets/perf/per-model/gpt-oss-20b-mxfp4-panels.svg +70 -0
  41. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.5-122b-a10b-ud-q5km-panels-dark.svg +101 -0
  42. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.5-122b-a10b-ud-q5km-panels.svg +101 -0
  43. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.5-9b-q6k-panels-dark.svg +85 -0
  44. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.5-9b-q6k-panels.svg +85 -0
  45. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.6-27b-q6k-panels-dark.svg +101 -0
  46. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.6-27b-q6k-panels.svg +101 -0
  47. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.6-35b-a3b-heretic-q6k-panels-dark.svg +97 -0
  48. gmlx-0.0.1/docs/assets/perf/per-model/qwen3.6-35b-a3b-heretic-q6k-panels.svg +97 -0
  49. gmlx-0.0.1/docs/assistant.md +291 -0
  50. gmlx-0.0.1/docs/benchmarks.json +2645 -0
  51. gmlx-0.0.1/docs/benchmarks.md +297 -0
  52. gmlx-0.0.1/docs/cli.md +1208 -0
  53. gmlx-0.0.1/docs/getting-started.md +339 -0
  54. gmlx-0.0.1/docs/launch.md +285 -0
  55. gmlx-0.0.1/docs/lora.md +166 -0
  56. gmlx-0.0.1/docs/migrating.md +77 -0
  57. gmlx-0.0.1/docs/performance.md +372 -0
  58. gmlx-0.0.1/docs/python.md +176 -0
  59. gmlx-0.0.1/docs/rag.md +135 -0
  60. gmlx-0.0.1/docs/server-config.md +1540 -0
  61. gmlx-0.0.1/docs/serving-architecture.md +138 -0
  62. gmlx-0.0.1/docs/talk.md +373 -0
  63. gmlx-0.0.1/docs/testing.md +152 -0
  64. gmlx-0.0.1/docs/troubleshooting.md +151 -0
  65. gmlx-0.0.1/docs/upstream-upgrades.md +106 -0
  66. gmlx-0.0.1/docs/vlm.md +103 -0
  67. gmlx-0.0.1/gmlx/__init__.py +73 -0
  68. gmlx-0.0.1/gmlx/__main__.py +14 -0
  69. gmlx-0.0.1/gmlx/_vendor/__init__.py +9 -0
  70. gmlx-0.0.1/gmlx/_vendor/misaki/LICENSE +202 -0
  71. gmlx-0.0.1/gmlx/_vendor/misaki/__init__.py +1 -0
  72. gmlx-0.0.1/gmlx/_vendor/misaki/cutlet.py +423 -0
  73. gmlx-0.0.1/gmlx/_vendor/misaki/data/__init__.py +0 -0
  74. gmlx-0.0.1/gmlx/_vendor/misaki/data/gb_gold.json +89734 -0
  75. gmlx-0.0.1/gmlx/_vendor/misaki/data/gb_silver.json +109768 -0
  76. gmlx-0.0.1/gmlx/_vendor/misaki/data/ja_words.txt +147571 -0
  77. gmlx-0.0.1/gmlx/_vendor/misaki/data/us_gold.json +92589 -0
  78. gmlx-0.0.1/gmlx/_vendor/misaki/data/us_silver.json +93363 -0
  79. gmlx-0.0.1/gmlx/_vendor/misaki/data/vi_acronyms.json +3100 -0
  80. gmlx-0.0.1/gmlx/_vendor/misaki/data/vi_symbols.json +64 -0
  81. gmlx-0.0.1/gmlx/_vendor/misaki/data/vi_teencode.json +484 -0
  82. gmlx-0.0.1/gmlx/_vendor/misaki/en.py +738 -0
  83. gmlx-0.0.1/gmlx/_vendor/misaki/espeak.py +107 -0
  84. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/__init__.py +6 -0
  85. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/english.py +191 -0
  86. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/g2pk.py +142 -0
  87. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/idioms.txt +425 -0
  88. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/numerals.py +137 -0
  89. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/regular.py +105 -0
  90. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/rules.txt +240 -0
  91. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/special.py +178 -0
  92. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/table.csv +28 -0
  93. gmlx-0.0.1/gmlx/_vendor/misaki/g2pkc/utils.py +276 -0
  94. gmlx-0.0.1/gmlx/_vendor/misaki/he.py +22 -0
  95. gmlx-0.0.1/gmlx/_vendor/misaki/ja.py +356 -0
  96. gmlx-0.0.1/gmlx/_vendor/misaki/ko.py +11 -0
  97. gmlx-0.0.1/gmlx/_vendor/misaki/num2kana.py +318 -0
  98. gmlx-0.0.1/gmlx/_vendor/misaki/token.py +18 -0
  99. gmlx-0.0.1/gmlx/_vendor/misaki/tone_sandhi.py +385 -0
  100. gmlx-0.0.1/gmlx/_vendor/misaki/transcription.py +284 -0
  101. gmlx-0.0.1/gmlx/_vendor/misaki/vi.py +544 -0
  102. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/__init__.py +1 -0
  103. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/abbreviation_vi.py +52 -0
  104. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/acronym_vi.py +247 -0
  105. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/cleaner.py +152 -0
  106. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/currency_vi.py +48 -0
  107. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/datestime_vi.py +191 -0
  108. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/letter_vi.py +53 -0
  109. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/measurement_vi.py +68 -0
  110. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/num2vi.py +244 -0
  111. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/numberical_vi.py +116 -0
  112. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/passage_utils.py +28 -0
  113. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/roman_number_vi.py +34 -0
  114. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/sentence_utils.py +42 -0
  115. gmlx-0.0.1/gmlx/_vendor/misaki/vi_cleaner/symbol_vi.py +13 -0
  116. gmlx-0.0.1/gmlx/_vendor/misaki/zh.py +85 -0
  117. gmlx-0.0.1/gmlx/_vendor/misaki/zh_frontend.py +231 -0
  118. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/__init__.py +14 -0
  119. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/char_convert.py +46 -0
  120. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/chronology.py +134 -0
  121. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/constants.py +62 -0
  122. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/num.py +238 -0
  123. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/phonecode.py +63 -0
  124. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/quantifier.py +65 -0
  125. gmlx-0.0.1/gmlx/_vendor/misaki/zh_normalization/text_normalization.py +154 -0
  126. gmlx-0.0.1/gmlx/adapter.py +241 -0
  127. gmlx-0.0.1/gmlx/apc_pooling.py +441 -0
  128. gmlx-0.0.1/gmlx/arch_table.py +250 -0
  129. gmlx-0.0.1/gmlx/assistant_brain.py +291 -0
  130. gmlx-0.0.1/gmlx/assistant_serve.py +648 -0
  131. gmlx-0.0.1/gmlx/attn_hd512.py +534 -0
  132. gmlx-0.0.1/gmlx/benchmarks.py +437 -0
  133. gmlx-0.0.1/gmlx/cache_compat.py +109 -0
  134. gmlx-0.0.1/gmlx/cache_snapshot.py +528 -0
  135. gmlx-0.0.1/gmlx/chat.py +3436 -0
  136. gmlx-0.0.1/gmlx/cli.py +2068 -0
  137. gmlx-0.0.1/gmlx/completion.py +471 -0
  138. gmlx-0.0.1/gmlx/config.py +1636 -0
  139. gmlx-0.0.1/gmlx/config_synth.py +2770 -0
  140. gmlx-0.0.1/gmlx/decode_feeder.py +1229 -0
  141. gmlx-0.0.1/gmlx/deepseek_v4_cache.py +1133 -0
  142. gmlx-0.0.1/gmlx/deepseek_v4_hyper_connection.py +310 -0
  143. gmlx-0.0.1/gmlx/deepseek_v4_model.py +2295 -0
  144. gmlx-0.0.1/gmlx/deepseek_v4_mtp.py +528 -0
  145. gmlx-0.0.1/gmlx/diffusion.py +85 -0
  146. gmlx-0.0.1/gmlx/discovery.py +1167 -0
  147. gmlx-0.0.1/gmlx/doctor.py +473 -0
  148. gmlx-0.0.1/gmlx/drafter_protocol.py +231 -0
  149. gmlx-0.0.1/gmlx/dsv32_patches.py +428 -0
  150. gmlx-0.0.1/gmlx/embeddings.py +510 -0
  151. gmlx-0.0.1/gmlx/envflags.py +43 -0
  152. gmlx-0.0.1/gmlx/extras.py +115 -0
  153. gmlx-0.0.1/gmlx/feeder.py +261 -0
  154. gmlx-0.0.1/gmlx/feeder_common.py +65 -0
  155. gmlx-0.0.1/gmlx/gdn_patches.py +1258 -0
  156. gmlx-0.0.1/gmlx/generation.py +1245 -0
  157. gmlx-0.0.1/gmlx/gguf_meta.py +109 -0
  158. gmlx-0.0.1/gmlx/gpt_oss_prefill.py +41 -0
  159. gmlx-0.0.1/gmlx/headerscan.py +176 -0
  160. gmlx-0.0.1/gmlx/hf_cache.py +99 -0
  161. gmlx-0.0.1/gmlx/hotkey.py +189 -0
  162. gmlx-0.0.1/gmlx/hy_v3_model.py +448 -0
  163. gmlx-0.0.1/gmlx/hy_v3_mtp.py +221 -0
  164. gmlx-0.0.1/gmlx/hy_v3_tools.py +139 -0
  165. gmlx-0.0.1/gmlx/launch.py +1286 -0
  166. gmlx-0.0.1/gmlx/lifecycle.py +1229 -0
  167. gmlx-0.0.1/gmlx/loader.py +2672 -0
  168. gmlx-0.0.1/gmlx/loadlog.py +249 -0
  169. gmlx-0.0.1/gmlx/lookahead.py +446 -0
  170. gmlx-0.0.1/gmlx/manage.py +1428 -0
  171. gmlx-0.0.1/gmlx/menubar.py +1474 -0
  172. gmlx-0.0.1/gmlx/menubar_config.py +331 -0
  173. gmlx-0.0.1/gmlx/minimax_m3_model.py +673 -0
  174. gmlx-0.0.1/gmlx/modules.py +1389 -0
  175. gmlx-0.0.1/gmlx/moe_experts.py +407 -0
  176. gmlx-0.0.1/gmlx/mtp_drafter.py +549 -0
  177. gmlx-0.0.1/gmlx/mtp_load.py +797 -0
  178. gmlx-0.0.1/gmlx/native_fp.py +155 -0
  179. gmlx-0.0.1/gmlx/overgen.py +98 -0
  180. gmlx-0.0.1/gmlx/pagecache.py +190 -0
  181. gmlx-0.0.1/gmlx/patching.py +26 -0
  182. gmlx-0.0.1/gmlx/populate.py +248 -0
  183. gmlx-0.0.1/gmlx/prefetch.py +342 -0
  184. gmlx-0.0.1/gmlx/prefill_decay.py +406 -0
  185. gmlx-0.0.1/gmlx/prefix_cache.py +329 -0
  186. gmlx-0.0.1/gmlx/preflight.py +175 -0
  187. gmlx-0.0.1/gmlx/procname.py +298 -0
  188. gmlx-0.0.1/gmlx/profiles.py +272 -0
  189. gmlx-0.0.1/gmlx/qkv_fuse.py +140 -0
  190. gmlx-0.0.1/gmlx/qwen35_verify_fold.py +182 -0
  191. gmlx-0.0.1/gmlx/reasoning.py +366 -0
  192. gmlx-0.0.1/gmlx/remap.py +1580 -0
  193. gmlx-0.0.1/gmlx/remote.py +404 -0
  194. gmlx-0.0.1/gmlx/render.py +533 -0
  195. gmlx-0.0.1/gmlx/rerank.py +294 -0
  196. gmlx-0.0.1/gmlx/residency.py +944 -0
  197. gmlx-0.0.1/gmlx/rotating_cache_fix.py +89 -0
  198. gmlx-0.0.1/gmlx/server.py +1623 -0
  199. gmlx-0.0.1/gmlx/server_bridge_lm.py +112 -0
  200. gmlx-0.0.1/gmlx/server_bridge_vlm.py +1185 -0
  201. gmlx-0.0.1/gmlx/server_memory.py +112 -0
  202. gmlx-0.0.1/gmlx/server_patches/__init__.py +231 -0
  203. gmlx-0.0.1/gmlx/server_patches/_common.py +111 -0
  204. gmlx-0.0.1/gmlx/server_patches/apc.py +277 -0
  205. gmlx-0.0.1/gmlx/server_patches/api_contract.py +295 -0
  206. gmlx-0.0.1/gmlx/server_patches/chat_behavior.py +509 -0
  207. gmlx-0.0.1/gmlx/server_patches/completions.py +431 -0
  208. gmlx-0.0.1/gmlx/server_patches/hardening.py +181 -0
  209. gmlx-0.0.1/gmlx/server_patches/observability.py +151 -0
  210. gmlx-0.0.1/gmlx/server_patches/request_flow.py +271 -0
  211. gmlx-0.0.1/gmlx/server_patches/routes.py +879 -0
  212. gmlx-0.0.1/gmlx/server_patches/sampling.py +313 -0
  213. gmlx-0.0.1/gmlx/sessions.py +182 -0
  214. gmlx-0.0.1/gmlx/spec_engine.py +1089 -0
  215. gmlx-0.0.1/gmlx/spec_helpers.py +457 -0
  216. gmlx-0.0.1/gmlx/speculative.py +1740 -0
  217. gmlx-0.0.1/gmlx/spinner.py +85 -0
  218. gmlx-0.0.1/gmlx/step_timing.py +99 -0
  219. gmlx-0.0.1/gmlx/stt.py +237 -0
  220. gmlx-0.0.1/gmlx/subservice.py +164 -0
  221. gmlx-0.0.1/gmlx/talk.py +1257 -0
  222. gmlx-0.0.1/gmlx/talk_audio.py +457 -0
  223. gmlx-0.0.1/gmlx/talk_client.py +481 -0
  224. gmlx-0.0.1/gmlx/talk_mcp.py +253 -0
  225. gmlx-0.0.1/gmlx/talk_memory.py +524 -0
  226. gmlx-0.0.1/gmlx/textfmt.py +8 -0
  227. gmlx-0.0.1/gmlx/theme.py +433 -0
  228. gmlx-0.0.1/gmlx/thinking_budget.py +389 -0
  229. gmlx-0.0.1/gmlx/tokenizer.py +695 -0
  230. gmlx-0.0.1/gmlx/train.py +231 -0
  231. gmlx-0.0.1/gmlx/transforms.py +191 -0
  232. gmlx-0.0.1/gmlx/tts.py +437 -0
  233. gmlx-0.0.1/gmlx/upstream_seams.json +71 -0
  234. gmlx-0.0.1/gmlx/upstream_seams.py +442 -0
  235. gmlx-0.0.1/gmlx/vlm.py +1770 -0
  236. gmlx-0.0.1/gmlx/wizard.py +683 -0
  237. gmlx-0.0.1/gmlx.egg-info/PKG-INFO +515 -0
  238. gmlx-0.0.1/gmlx.egg-info/SOURCES.txt +389 -0
  239. gmlx-0.0.1/gmlx.egg-info/dependency_links.txt +1 -0
  240. gmlx-0.0.1/gmlx.egg-info/entry_points.txt +2 -0
  241. gmlx-0.0.1/gmlx.egg-info/requires.txt +48 -0
  242. gmlx-0.0.1/gmlx.egg-info/top_level.txt +1 -0
  243. gmlx-0.0.1/licenses/ds4.c-LICENSE +30 -0
  244. gmlx-0.0.1/licenses/llama.cpp-LICENSE +28 -0
  245. gmlx-0.0.1/licenses/misaki-LICENSE +201 -0
  246. gmlx-0.0.1/licenses/mlx-lm-LICENSE +31 -0
  247. gmlx-0.0.1/licenses/mlx-vlm-LICENSE +35 -0
  248. gmlx-0.0.1/licenses/omlx-LICENSE +211 -0
  249. gmlx-0.0.1/pyproject.toml +153 -0
  250. gmlx-0.0.1/setup.cfg +4 -0
  251. gmlx-0.0.1/tests/conftest.py +130 -0
  252. gmlx-0.0.1/tests/e2e/README.md +161 -0
  253. gmlx-0.0.1/tests/e2e/assets/README.md +7 -0
  254. gmlx-0.0.1/tests/e2e/assets/cats.jpg +0 -0
  255. gmlx-0.0.1/tests/e2e/checks.py +228 -0
  256. gmlx-0.0.1/tests/e2e/client.py +158 -0
  257. gmlx-0.0.1/tests/e2e/judge.py +204 -0
  258. gmlx-0.0.1/tests/e2e/models.py +138 -0
  259. gmlx-0.0.1/tests/e2e/prompts.py +172 -0
  260. gmlx-0.0.1/tests/e2e/pty_session.py +124 -0
  261. gmlx-0.0.1/tests/e2e/report.py +271 -0
  262. gmlx-0.0.1/tests/e2e/run_apc_disk_e2e.py +520 -0
  263. gmlx-0.0.1/tests/e2e/run_chat_pty_e2e.py +396 -0
  264. gmlx-0.0.1/tests/e2e/run_lora_e2e.py +282 -0
  265. gmlx-0.0.1/tests/e2e/run_server_e2e.py +456 -0
  266. gmlx-0.0.1/tests/e2e/scenarios.py +635 -0
  267. gmlx-0.0.1/tests/e2e/server_proc.py +136 -0
  268. gmlx-0.0.1/tests/test_adapter.py +103 -0
  269. gmlx-0.0.1/tests/test_adapter_save.py +91 -0
  270. gmlx-0.0.1/tests/test_apc_pooling.py +454 -0
  271. gmlx-0.0.1/tests/test_apc_store_eval.py +155 -0
  272. gmlx-0.0.1/tests/test_api_contract.py +471 -0
  273. gmlx-0.0.1/tests/test_arch_gate.py +120 -0
  274. gmlx-0.0.1/tests/test_ascii_hygiene.py +61 -0
  275. gmlx-0.0.1/tests/test_assistant_brain.py +264 -0
  276. gmlx-0.0.1/tests/test_assistant_serve.py +560 -0
  277. gmlx-0.0.1/tests/test_attn_hd512_verify.py +310 -0
  278. gmlx-0.0.1/tests/test_batch_parity.py +200 -0
  279. gmlx-0.0.1/tests/test_bench_prompt_source.py +108 -0
  280. gmlx-0.0.1/tests/test_cache_snapshot.py +761 -0
  281. gmlx-0.0.1/tests/test_chat.py +968 -0
  282. gmlx-0.0.1/tests/test_chat_assistant.py +367 -0
  283. gmlx-0.0.1/tests/test_chat_e2e.py +1088 -0
  284. gmlx-0.0.1/tests/test_chat_pty.py +65 -0
  285. gmlx-0.0.1/tests/test_chat_sessions.py +147 -0
  286. gmlx-0.0.1/tests/test_ckpt_tier.py +378 -0
  287. gmlx-0.0.1/tests/test_cli_config_model.py +366 -0
  288. gmlx-0.0.1/tests/test_cli_consistency.py +181 -0
  289. gmlx-0.0.1/tests/test_cli_run_flags.py +241 -0
  290. gmlx-0.0.1/tests/test_cli_umbrella.py +156 -0
  291. gmlx-0.0.1/tests/test_cli_validation.py +357 -0
  292. gmlx-0.0.1/tests/test_cmd_profiles.py +115 -0
  293. gmlx-0.0.1/tests/test_completion.py +264 -0
  294. gmlx-0.0.1/tests/test_completions_route.py +249 -0
  295. gmlx-0.0.1/tests/test_config.py +1729 -0
  296. gmlx-0.0.1/tests/test_config_synth.py +1541 -0
  297. gmlx-0.0.1/tests/test_decode_feeder.py +1006 -0
  298. gmlx-0.0.1/tests/test_deepseek_v4_indexer_quant.py +210 -0
  299. gmlx-0.0.1/tests/test_deepseek_v4_kv_quant.py +140 -0
  300. gmlx-0.0.1/tests/test_deepseek_v4_mtp.py +591 -0
  301. gmlx-0.0.1/tests/test_deepseek_v4_qat.py +320 -0
  302. gmlx-0.0.1/tests/test_deepseek_v4_score_profile.py +198 -0
  303. gmlx-0.0.1/tests/test_diffusion_gemma.py +275 -0
  304. gmlx-0.0.1/tests/test_discovery.py +701 -0
  305. gmlx-0.0.1/tests/test_docs_config.py +174 -0
  306. gmlx-0.0.1/tests/test_docs_python.py +127 -0
  307. gmlx-0.0.1/tests/test_doctor.py +436 -0
  308. gmlx-0.0.1/tests/test_drafter_protocol.py +269 -0
  309. gmlx-0.0.1/tests/test_ds4_overlap_lookback.py +170 -0
  310. gmlx-0.0.1/tests/test_dsv32_indexer_rope.py +285 -0
  311. gmlx-0.0.1/tests/test_dsv32_mask_decode.py +174 -0
  312. gmlx-0.0.1/tests/test_e2e_checks.py +134 -0
  313. gmlx-0.0.1/tests/test_embeddings.py +516 -0
  314. gmlx-0.0.1/tests/test_envflags.py +430 -0
  315. gmlx-0.0.1/tests/test_extras_pyproject.py +73 -0
  316. gmlx-0.0.1/tests/test_feeder.py +186 -0
  317. gmlx-0.0.1/tests/test_full_prompt_prefill.py +1341 -0
  318. gmlx-0.0.1/tests/test_generate_over.py +193 -0
  319. gmlx-0.0.1/tests/test_headerscan.py +113 -0
  320. gmlx-0.0.1/tests/test_hf_cache.py +150 -0
  321. gmlx-0.0.1/tests/test_hotkey.py +75 -0
  322. gmlx-0.0.1/tests/test_hy_v3_mtp.py +272 -0
  323. gmlx-0.0.1/tests/test_hy_v3_tools.py +155 -0
  324. gmlx-0.0.1/tests/test_init_wizard.py +570 -0
  325. gmlx-0.0.1/tests/test_launch.py +1681 -0
  326. gmlx-0.0.1/tests/test_lifecycle.py +1202 -0
  327. gmlx-0.0.1/tests/test_loader_api.py +110 -0
  328. gmlx-0.0.1/tests/test_loader_guards.py +56 -0
  329. gmlx-0.0.1/tests/test_loadlog.py +374 -0
  330. gmlx-0.0.1/tests/test_long_context.py +344 -0
  331. gmlx-0.0.1/tests/test_lookahead.py +320 -0
  332. gmlx-0.0.1/tests/test_manage.py +1249 -0
  333. gmlx-0.0.1/tests/test_menubar.py +688 -0
  334. gmlx-0.0.1/tests/test_menubar_config.py +126 -0
  335. gmlx-0.0.1/tests/test_minimax_m3_msa.py +430 -0
  336. gmlx-0.0.1/tests/test_modules_lora.py +161 -0
  337. gmlx-0.0.1/tests/test_moe_experts.py +373 -0
  338. gmlx-0.0.1/tests/test_mtp.py +233 -0
  339. gmlx-0.0.1/tests/test_native_fp.py +421 -0
  340. gmlx-0.0.1/tests/test_offload.py +457 -0
  341. gmlx-0.0.1/tests/test_overgen.py +107 -0
  342. gmlx-0.0.1/tests/test_pagecache.py +103 -0
  343. gmlx-0.0.1/tests/test_patching.py +40 -0
  344. gmlx-0.0.1/tests/test_populate.py +169 -0
  345. gmlx-0.0.1/tests/test_pq_log.py +194 -0
  346. gmlx-0.0.1/tests/test_prefetch.py +84 -0
  347. gmlx-0.0.1/tests/test_prefill_decay.py +485 -0
  348. gmlx-0.0.1/tests/test_prefix_cache_budget.py +207 -0
  349. gmlx-0.0.1/tests/test_preflight.py +142 -0
  350. gmlx-0.0.1/tests/test_profiles.py +142 -0
  351. gmlx-0.0.1/tests/test_qwen35_verify_fold.py +153 -0
  352. gmlx-0.0.1/tests/test_reasoning.py +283 -0
  353. gmlx-0.0.1/tests/test_remap.py +1110 -0
  354. gmlx-0.0.1/tests/test_remote.py +310 -0
  355. gmlx-0.0.1/tests/test_render.py +322 -0
  356. gmlx-0.0.1/tests/test_rerank.py +230 -0
  357. gmlx-0.0.1/tests/test_residency.py +445 -0
  358. gmlx-0.0.1/tests/test_residency_config.py +468 -0
  359. gmlx-0.0.1/tests/test_rope_factors.py +106 -0
  360. gmlx-0.0.1/tests/test_run_think_echo.py +100 -0
  361. gmlx-0.0.1/tests/test_serve_apc_engagement.py +108 -0
  362. gmlx-0.0.1/tests/test_server.py +1272 -0
  363. gmlx-0.0.1/tests/test_server_bridge.py +132 -0
  364. gmlx-0.0.1/tests/test_server_memory.py +78 -0
  365. gmlx-0.0.1/tests/test_server_patches.py +2361 -0
  366. gmlx-0.0.1/tests/test_serving_apc_config.py +47 -0
  367. gmlx-0.0.1/tests/test_serving_config.py +430 -0
  368. gmlx-0.0.1/tests/test_serving_mtp.py +764 -0
  369. gmlx-0.0.1/tests/test_serving_text_embed.py +103 -0
  370. gmlx-0.0.1/tests/test_serving_vlm.py +206 -0
  371. gmlx-0.0.1/tests/test_spec_engine_release.py +227 -0
  372. gmlx-0.0.1/tests/test_spec_kv_quant.py +195 -0
  373. gmlx-0.0.1/tests/test_spinner.py +102 -0
  374. gmlx-0.0.1/tests/test_stoch_accept.py +182 -0
  375. gmlx-0.0.1/tests/test_structured.py +97 -0
  376. gmlx-0.0.1/tests/test_stt.py +278 -0
  377. gmlx-0.0.1/tests/test_switch_compat.py +122 -0
  378. gmlx-0.0.1/tests/test_talk.py +961 -0
  379. gmlx-0.0.1/tests/test_talk_audio.py +196 -0
  380. gmlx-0.0.1/tests/test_talk_client.py +303 -0
  381. gmlx-0.0.1/tests/test_talk_mcp.py +219 -0
  382. gmlx-0.0.1/tests/test_talk_memory.py +634 -0
  383. gmlx-0.0.1/tests/test_theme.py +94 -0
  384. gmlx-0.0.1/tests/test_thinking_budget.py +453 -0
  385. gmlx-0.0.1/tests/test_tokenizer.py +444 -0
  386. gmlx-0.0.1/tests/test_train.py +115 -0
  387. gmlx-0.0.1/tests/test_transforms.py +172 -0
  388. gmlx-0.0.1/tests/test_tts.py +338 -0
  389. gmlx-0.0.1/tests/test_upstream_seams.py +80 -0
  390. gmlx-0.0.1/tests/test_vlm_resolve.py +35 -0
  391. gmlx-0.0.1/tests/test_wire_contract.py +763 -0
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project aims to
5
+ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.0.1] - 2026-07-19
8
+
9
+ Initial public release: packaging and release-pipeline validation.
@@ -0,0 +1,77 @@
1
+ # Contributing
2
+
3
+ Thanks for considering a contribution. This page covers the mechanics; for design
4
+ context, the docs under [`docs/`](docs/) are the source of truth.
5
+
6
+ ## Dev setup
7
+
8
+ `mlx-kquant` is on PyPI with prebuilt arm64 wheels for Python 3.10-3.13 on
9
+ macOS 26+. Older macOS builds it from source, which needs the Xcode Command
10
+ Line Tools. It pins `mlx==0.31.2` itself, so nothing else needs pinning. Dev
11
+ setup is a venv, a clone, and an editable install:
12
+
13
+ ```sh
14
+ python3 -m venv .venv && source .venv/bin/activate
15
+ git clone https://github.com/asher/gmlx
16
+ pip install -e "./gmlx[chat]" pytest ruff
17
+ ```
18
+
19
+ macOS on Apple Silicon is the primary target. mlx-kquant also builds CPU-only on
20
+ Linux, which is enough for the default test tier.
21
+
22
+ ## Tests
23
+
24
+ Three tiers (full guide: [docs/testing.md](docs/testing.md)):
25
+
26
+ ```sh
27
+ pytest # CPU logic tests: no models, runs anywhere
28
+ KQUANT_TEST_GGUF_DIR=~/llm/gguf pytest # + numerical parity vs real GGUFs (add -m integration to run only those)
29
+ python tests/e2e/run_server_e2e.py # server end-to-end harness (GPU)
30
+ ```
31
+
32
+ A PR should keep `pytest` (the default tier) green. If your change touches
33
+ loading/numerics, say which integration tests you ran and on which model. New
34
+ architectures need a greedy token-parity check against llama.cpp at long context,
35
+ and must keep `scripts/check-coverage.py --check --strict` green with
36
+ `docs/arch-coverage.md` regenerated. Short-prompt parity is not sufficient:
37
+ attention bugs only surface at depth.
38
+ What adding an architecture involves, and the full acceptance gate:
39
+ [docs/adding-architectures.md](docs/adding-architectures.md).
40
+
41
+ ## Lint
42
+
43
+ ```sh
44
+ ruff check .
45
+ ```
46
+
47
+ ## Things to know before you patch
48
+
49
+ - Seam patches are version-fragile by design. The serving stack adopts mlx-vlm's
50
+ FastAPI app + batching engine by patching late-bound seams (`server_bridge_vlm.py`,
51
+ `residency.py`, `server_patches/`), and the loader patches a few mlx-lm classes
52
+ at load time. `server_bridge_lm.py` separately patches `mlx_lm.server`'s
53
+ `ModelProvider._load` (the sequential mlx-lm server, not mlx-vlm). Every patch
54
+ carries a guard or version tripwire that fails loudly.
55
+ Keep that property: a new patch must be idempotent and must raise (not silently
56
+ no-op) when the upstream surface it expects has changed. The `mlx-vlm` upper
57
+ bound in `pyproject.toml` is bumped deliberately, after re-running the server
58
+ tests against the new version.
59
+ - One module per concern: tensor-name remap lives in `remap.py`, config
60
+ synthesis in `config_synth.py`, arch metadata in `arch_table.py`. A new
61
+ architecture usually touches exactly those three plus a parity test.
62
+ - Error messages name the fix. Follow the existing style: say what was
63
+ expected, what was found, and what the user (or upgrader) should do.
64
+
65
+ ## Commit style
66
+
67
+ A single line, no body: `(topic): short imperative summary`, e.g.
68
+ `(arch): add falcon-h1`, `(server): fix XTC 400 on bare-int eos_token_ids`.
69
+ The topic is parenthesized and names one top-level feature; pick from the
70
+ established set so history stays greppable:
71
+
72
+ `arch`, `loader`, `server`, `cli`, `chat`, `mtp`, `adapter`, `train`,
73
+ `stream` (formerly `cpu-moe`), `vlm`, `manage`, `launch`, `config`, `bench`,
74
+ `tests`, `docs`, `release`, `hygiene`.
75
+
76
+ Keep everything on the subject line, no extended body. A revert is
77
+ `(topic): revert <what>`.
gmlx-0.0.1/LICENSE ADDED
@@ -0,0 +1,112 @@
1
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
2
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
3
+
4
+ Parameters
5
+
6
+ Licensor: Asher Feldman
7
+ Licensed Work: gmlx 0.0.1 and later versions
8
+ Copyright © 2026 Asher Feldman
9
+ Additional Use Grant: You may make production use of the Licensed Work, including for commercial
10
+ and professional purposes, provided that you do not (a) sell the Licensed
11
+ Work or any derivative work of it, or charge any fee for its distribution;
12
+ (b) incorporate the Licensed Work or any derivative work of it, in whole
13
+ or in part and in source or binary form, into any commercial software
14
+ product or service; or (c) offer the Licensed Work or any derivative work
15
+ of it to third parties as a hosted, managed, or cloud-based service. For
16
+ the avoidance of doubt: running the Licensed Work to perform your own or
17
+ your organization's work, including paid or professional work, is
18
+ permitted, and redistributing unmodified copies of the Licensed Work free
19
+ of charge, including through package managers, is permitted.
20
+ Absolutely no claims are made against inference outputs. Downloaded weights
21
+ may carry their own use license.
22
+ Change Date: Four years from the date the Licensed Work is published.
23
+ Change License: Apache License, Version 2.0
24
+
25
+ For information about alternative licensing arrangements for the Licensed Work,
26
+ please contact asher_feldman@icloud.com.
27
+
28
+ Notice
29
+
30
+ Business Source License 1.1
31
+
32
+ Terms
33
+
34
+ The Licensor hereby grants you the right to copy, modify, create derivative
35
+ works, redistribute, and make non-production use of the Licensed Work. The
36
+ Licensor may make an Additional Use Grant, above, permitting limited production use.
37
+
38
+ Effective on the Change Date, or the fourth anniversary of the first publicly
39
+ available distribution of a specific version of the Licensed Work under this
40
+ License, whichever comes first, the Licensor hereby grants you rights under
41
+ the terms of the Change License, and the rights granted in the paragraph
42
+ above terminate.
43
+
44
+ If your use of the Licensed Work does not comply with the requirements
45
+ currently in effect as described in this License, you must purchase a
46
+ commercial license from the Licensor, its affiliated entities, or authorized
47
+ resellers, or you must refrain from using the Licensed Work.
48
+
49
+ All copies of the original and modified Licensed Work, and derivative works
50
+ of the Licensed Work, are subject to this License. This License applies
51
+ separately for each version of the Licensed Work and the Change Date may vary
52
+ for each version of the Licensed Work released by Licensor.
53
+
54
+ You must conspicuously display this License on each original or modified copy
55
+ of the Licensed Work. If you receive the Licensed Work in original or
56
+ modified form from a third party, the terms and conditions set forth in this
57
+ License apply to your use of that work.
58
+
59
+ Any use of the Licensed Work in violation of this License will automatically
60
+ terminate your rights under this License for the current and all other
61
+ versions of the Licensed Work.
62
+
63
+ This License does not grant you any right in any trademark or logo of
64
+ Licensor or its affiliates (provided that you may use a trademark or logo of
65
+ Licensor as expressly required by this License).
66
+
67
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
68
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
69
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
70
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
71
+ TITLE.
72
+
73
+ ================================================================================
74
+ THIRD-PARTY NOTES
75
+ ================================================================================
76
+
77
+ gmlx is pure Python. Most third-party code arrives as installed
78
+ dependencies, each under its own license: mlx-kquant (MIT; supplies the
79
+ K-quant Metal kernels and the C++ GGUF reader, with its own attributions to
80
+ MLX, ggml/llama.cpp, and gguf-tools), MLX and mlx-lm (MIT, Copyright ©
81
+ Apple Inc.), mlx-vlm (MIT, Copyright © Prince Canuma), and the GGUF file
82
+ format defined by the ggml/llama.cpp project (MIT, Copyright (c) Georgi
83
+ Gerganov).
84
+
85
+ Some third-party code is vendored or adapted into the gmlx tree. Each such
86
+ source file states its provenance in its header, and the licenses/
87
+ directory reproduces every upstream license together with a note on what
88
+ was taken:
89
+
90
+ - gmlx/_vendor/misaki: a snapshot of the misaki grapheme-to-phoneme
91
+ library (Apache License 2.0, Copyright © hexgrad; see
92
+ gmlx/_vendor/misaki/LICENSE and licenses/misaki-LICENSE), which itself
93
+ incorporates components adapted from g2pK and PaddleSpeech as noted in
94
+ its subdirectory READMEs.
95
+ - Model and cache classes vendored from unmerged mlx-lm pull requests
96
+ (MIT, Copyright © Apple Inc.; licenses/mlx-lm-LICENSE):
97
+ gmlx/deepseek_v4_model.py, gmlx/deepseek_v4_hyper_connection.py, and
98
+ gmlx/deepseek_v4_cache.py (PR #1192), gmlx/minimax_m3_model.py
99
+ (PR #1401), and gmlx/hy_v3_model.py (PR #1485).
100
+ - DeepSeek-V4-Flash MTP, cache-rollback, and stochastic-acceptance code
101
+ ported from omlx (Apache License 2.0; licenses/omlx-LICENSE), with
102
+ QAT and sink-attention semantics reimplemented from the ds4.c reference
103
+ engine (MIT; licenses/ds4.c-LICENSE).
104
+ - gmlx/server_patches/apc.py and gmlx/thinking_budget.py carry code
105
+ copied or ported from mlx-vlm (MIT, Copyright © Prince Canuma;
106
+ licenses/mlx-vlm-LICENSE).
107
+ - The pre-tokenizer split regex patterns in gmlx/tokenizer.py come from
108
+ llama.cpp (MIT; licenses/llama.cpp-LICENSE).
109
+
110
+ The test asset tests/e2e/assets/cats.jpg is reproduced from the mlx-vlm
111
+ repository (MIT License, Copyright © Prince Canuma); see
112
+ tests/e2e/assets/README.md.
gmlx-0.0.1/MANIFEST.in ADDED
@@ -0,0 +1,11 @@
1
+ # sdist contents: ship a checkout-equivalent tree — the default test*.py
2
+ # pattern would grab the test files but drop conftest.py, tests/e2e/, and
3
+ # docs/ (which test_docs_config.py reads), leaving an sdist that can't run
4
+ # its own suite.
5
+ include CHANGELOG.md
6
+ include CONTRIBUTING.md
7
+ graft licenses
8
+ graft bench
9
+ graft docs
10
+ graft tests
11
+ global-exclude __pycache__ *.py[cod] .DS_Store