@qvac/translation-nmtcpp 0.26.0 → 0.28.0

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.
package/README.md CHANGED
@@ -863,9 +863,16 @@ const {
863
863
  getIndicTransFileName // filename for a model key
864
864
  } = require('@qvac/translation-nmtcpp/lib/indictrans-model-fetcher')
865
865
 
866
- const modelPath = await ensureIndicTransModelFile('en-indic-200M-q4_0', './models')
866
+ const path = require('bare-path')
867
+
868
+ const modelKey = 'en-indic-1B-q4_0'
869
+ const modelPath = path.join('./models', getIndicTransFileName(modelKey))
870
+ await ensureIndicTransModelFile(modelPath, modelKey)
867
871
  ```
868
872
 
873
+ `ensureIndicTransModelFile(destPath, modelKey)` takes the full destination
874
+ file path and a model key. The key defaults to `en-indic-200M-q4_0`.
875
+
869
876
  ### Key Pattern
870
877
 
871
878
  IndicTrans2 fetcher keys follow `{direction}-{size}-{quantization}` — e.g.
@@ -873,6 +880,12 @@ IndicTrans2 fetcher keys follow `{direction}-{size}-{quantization}` — e.g.
873
880
  underlying registry paths follow
874
881
  `qvac_models_compiled/ggml/indictrans2/{quant}/{model}/{date}/{file}`.
875
882
 
883
+ | Direction | Sizes | Quantizations |
884
+ |-----------|-------|---------------|
885
+ | `en-indic` | `200M`, `1B` | `q4_0`, `f16` |
886
+ | `indic-en` | `200M`, `1B` | `q4_0`, `f16` |
887
+ | `indic-indic` | `320M`, `1B` | `q4_0`, `f16` |
888
+
876
889
  Applications that prefer not to manage files at all can use
877
890
  [`@qvac/inference`](../inference), which loads registry-hosted NMT models
878
891
  (engine `nmtcpp-translation`) and drives this addon internally.
@@ -14,13 +14,30 @@ exports.getIndicTransFileName = getIndicTransFileName;
14
14
  /* eslint-disable @typescript-eslint/no-require-imports -- Bare modules expose CommonJS export shapes. */
15
15
  const fs = require("bare-fs");
16
16
  const path = require("bare-path");
17
- exports.INDICTRANS_MODELS = {
18
- "en-indic-200M-q4_0": {
19
- registryPath: "qvac_models_compiled/ggml/indictrans2/q4_0/ggml-indictrans2-en-indic-dist-200M/2026-01-01/ggml-indictrans2-en-indic-dist-200M-q4_0.bin",
17
+ function registryModel(direction, size, quantization, expectedMinSizeMB) {
18
+ const variant = size === "1B" ? size : `dist-${size}`;
19
+ const modelName = `ggml-indictrans2-${direction}-${variant}`;
20
+ const filename = `${modelName}-${quantization}.bin`;
21
+ return {
22
+ registryPath: `qvac_models_compiled/ggml/indictrans2/${quantization}/${modelName}/2026-01-01/${filename}`,
20
23
  registrySource: "s3",
21
- filename: "ggml-indictrans2-en-indic-dist-200M-q4_0.bin",
22
- expectedMinSizeMB: 100,
23
- },
24
+ filename,
25
+ expectedMinSizeMB,
26
+ };
27
+ }
28
+ exports.INDICTRANS_MODELS = {
29
+ "en-indic-200M-q4_0": registryModel("en-indic", "200M", "q4_0", 100),
30
+ "en-indic-200M-f16": registryModel("en-indic", "200M", "f16", 330),
31
+ "en-indic-1B-q4_0": registryModel("en-indic", "1B", "q4_0", 480),
32
+ "en-indic-1B-f16": registryModel("en-indic", "1B", "f16", 1700),
33
+ "indic-en-200M-q4_0": registryModel("indic-en", "200M", "q4_0", 100),
34
+ "indic-en-200M-f16": registryModel("indic-en", "200M", "f16", 330),
35
+ "indic-en-1B-q4_0": registryModel("indic-en", "1B", "q4_0", 440),
36
+ "indic-en-1B-f16": registryModel("indic-en", "1B", "f16", 1560),
37
+ "indic-indic-320M-q4_0": registryModel("indic-indic", "320M", "q4_0", 150),
38
+ "indic-indic-320M-f16": registryModel("indic-indic", "320M", "f16", 500),
39
+ "indic-indic-1B-q4_0": registryModel("indic-indic", "1B", "q4_0", 530),
40
+ "indic-indic-1B-f16": registryModel("indic-indic", "1B", "f16", 1850),
24
41
  };
25
42
  // ============================================================================
26
43
  // Helpers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/translation-nmtcpp",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "translation addon for qvac",
5
5
  "addon": true,
6
6
  "engines": {
@@ -91,8 +91,8 @@
91
91
  "llvm-runtime": "^23.1.0",
92
92
  "nasm-runtime": "^3.2.0",
93
93
  "ninja-runtime": "^1.13.1",
94
- "@qvac/fabric-android-arm64": "^0.30.1",
95
- "@qvac/fabric-ios": "^0.30.1",
94
+ "@qvac/fabric-android-arm64": "^0.33.0",
95
+ "@qvac/fabric-ios": "^0.33.0",
96
96
  "@qvac/registry-client": "^0.6.1",
97
97
  "@types/node": "^24.2.1",
98
98
  "bare-fetch": "^3.0.1",
@@ -112,7 +112,7 @@
112
112
  },
113
113
  "dependencies": {
114
114
  "@qvac/error": "^0.1.0",
115
- "@qvac/fabric": "^0.30.1",
115
+ "@qvac/fabric": "^0.33.0",
116
116
  "@qvac/infer-base": "^0.8.0",
117
117
  "@qvac/logging": "^0.1.0",
118
118
  "bare-fs": "^4.5.1",
@@ -122,16 +122,16 @@
122
122
  "bare-url": "^2.1.6"
123
123
  },
124
124
  "optionalDependencies": {
125
- "@qvac/fabric-linux-x64": "^0.30.1",
126
- "@qvac/fabric-linux-arm64": "^0.30.1",
127
- "@qvac/fabric-darwin-arm64": "^0.30.1",
128
- "@qvac/fabric-darwin-x64": "^0.30.1",
129
- "@qvac/fabric-win32-x64": "^0.30.1"
125
+ "@qvac/fabric-linux-x64": "^0.33.0",
126
+ "@qvac/fabric-linux-arm64": "^0.33.0",
127
+ "@qvac/fabric-darwin-arm64": "^0.33.0",
128
+ "@qvac/fabric-darwin-x64": "^0.33.0",
129
+ "@qvac/fabric-win32-x64": "^0.33.0"
130
130
  },
131
131
  "peerDependencies": {
132
132
  "bare-fetch": "^3.0.1",
133
- "@qvac/fabric-android-arm64": "^0.30.1",
134
- "@qvac/fabric-ios": "^0.30.1"
133
+ "@qvac/fabric-android-arm64": "^0.33.0",
134
+ "@qvac/fabric-ios": "^0.33.0"
135
135
  },
136
136
  "peerDependenciesMeta": {
137
137
  "bare-fetch": {
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.26"
10
+ "version": "0.28"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -465,6 +465,7 @@
465
465
  "__ZN4absl12lts_2025081413base_internal11FastTypeTagIjE9kDummyVarE",
466
466
  "__ZGVZN4YAML3Exp9EndScalarEvE1e",
467
467
  "__ZGVZN4YAML3Exp6DocEndEvE1e",
468
+ "__ZNSt3__19__any_imp17__unique_typeinfoINS_6vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxS9_EEEEENS7_ISC_EEEEE4__idE",
468
469
  "__ZGVZN4YAML3Exp13ScanScalarEndEvE1e",
469
470
  "__ZNSt3__19__any_imp17__unique_typeinfoIN28qvac_lib_inference_addon_cpp6Output5ErrorEE4__idE",
470
471
  "__ZNSt3__19__any_imp17__unique_typeinfoINS_6vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS6_IS8_EEEEE4__idE",
@@ -518,7 +519,6 @@
518
519
  "__ZZN4absl12lts_2025081418container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEfEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_fEEEEE18GetPolicyFunctionsEvE5value",
519
520
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger12queue_mutex_E",
520
521
  "__ZGVZN4YAML3Exp3TabEvE1e",
521
- "__ZNSt3__19__any_imp17__unique_typeinfoINS_6vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENS7_ISC_EEEEE4__idE",
522
522
  "__ZZN4absl12lts_2025081413base_internal12CallOnceImplIMNS0_14flags_internal8FlagImplEFvvEJPS4_EEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_E5trans",
523
523
  "__ZZN4YAML3Exp5SpaceEvE1e",
524
524
  "__ZGVZN6spdlog7details10registry_tINSt3__15mutexEE8instanceEvE10s_instance",
@@ -4086,7 +4086,6 @@
4086
4086
  "__ZN4absl12lts_2025081419str_format_internal13FormatArgImpl8DispatchIbEEbNS2_4DataENS1_24FormatConversionSpecImplEPv",
4087
4087
  "__ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4SwapEPS9_",
4088
4088
  "__ZNK6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE14GetOwningArenaEv",
4089
- "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
4090
4089
  "__ZN9Microsoft3MSR4CNTK22ExceptionWithCallStackISt11logic_errorEC1ERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_",
4091
4090
  "__ZN4absl12lts_2025081418container_internal12raw_hash_setINS1_17FlatHashMapPolicyIyPN13sentencepiece3bpe7Trainer6SymbolEEENS0_13hash_internal4HashIyEENSt3__18equal_toIyEENSD_9allocatorINSD_4pairIKyS8_EEEEE46transfer_unprobed_elements_to_next_capacity_fnERNS1_12CommonFieldsEPKNS1_6ctrl_tEPvSR_PFvSR_hmmE",
4092
4091
  "__ZN3ruy7RunPackILNS_4PathE1ENS_17FixedKernelLayoutILNS_5OrderE0ELi1ELi1EEEaaEEvNS_6TuningERKNS_4EMatEPNS_5PEMatEii",
@@ -4497,7 +4496,6 @@
4497
4496
  "__ZN6google8protobuf13RepeatedFieldIiE7MutableEi",
4498
4497
  "__ZN6google8protobuf13RepeatedFieldIyE8CopyFromERKS2_",
4499
4498
  "__ZNK6google8protobuf13RepeatedFieldIxE3endEv",
4500
- "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN28qvac_lib_inference_addon_nmt9FitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
4501
4499
  "__ZN6google8protobuf13RepeatedFieldIyEC2Ev",
4502
4500
  "__ZNK6google8protobuf13RepeatedFieldIxE6rbeginEv",
4503
4501
  "__ZN6google8protobuf13RepeatedFieldIbE12SwapElementsEii",
@@ -4665,6 +4663,7 @@
4665
4663
  "__ZNK6google8protobuf8internal16RepeatedIteratorIyEptEv",
4666
4664
  "__ZN4absl12lts_2025081414flags_internal7FlagOpsIiEEPvNS1_6FlagOpEPKvS3_S3_",
4667
4665
  "__ZNK6google8protobuf8internal16RepeatedIteratorIbEplEl",
4666
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sPNS_18IAsyncTaskExecutorENS1_12CallbackDataIT_E4WorkENSD_7MarshalEENUlP11uv_handle_sE_8__invokeESH_",
4668
4667
  "__ZN6google8protobuf13RepeatedFieldIyEC1EOS2_",
4669
4668
  "__ZN6google8protobuf8internal16RepeatedIteratorIxEppEi",
4670
4669
  "__ZNK4absl12lts_2025081416strings_internal11BigUnsignedILi84EE8ToStringEv",
@@ -4935,6 +4934,7 @@
4935
4934
  "__ZN6google8protobuf13RepeatedFieldIfE3SetEiRKf",
4936
4935
  "__ZN4absl12lts_2025081416strings_internal11BigUnsignedILi4EE9SetToZeroEv",
4937
4936
  "__ZN8any_type4typeIdE2idEv",
4937
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN28qvac_lib_inference_addon_nmt9FitResultEEEP10js_value_sP8js_env_sPNS_18IAsyncTaskExecutorENS1_12CallbackDataIT_E4WorkENSD_7MarshalEENUlP11uv_handle_sE_8__invokeESH_",
4938
4938
  "__ZN4absl12lts_2025081416strings_internal11BigUnsignedILi84EE10MultiplyByEy",
4939
4939
  "__ZNK6google8protobuf13RepeatedFieldIfE4rendEv",
4940
4940
  "__ZNK6google8protobuf8internal16RepeatedIteratorIdEmiEl",