From 70d6b96981355856357d01335bf3ffe813aa413e Mon Sep 17 00:00:00 2001 From: Victor Rodzko Date: Wed, 15 Jul 2026 13:36:27 +0300 Subject: [PATCH 1/2] chore[mod]: remove unused translation models and optimize parakeet quantization - Remove Salamandra (SALAMANDRATA_2B_INST_Q4) and AfriqueGemma (AFRICAN_4B_TRANSLATION_Q4_K_M) models and tests per TL feedback - Replace Parakeet Q8_0 models with Q4_0 variants to reduce mobile download footprint by ~780 MiB - Total model payload reduction: ~4.78 GiB --- packages/sdk/e2e/tests/desktop/consumer.ts | 39 ++---- packages/sdk/e2e/tests/electron/consumer.ts | 39 ++---- packages/sdk/e2e/tests/mobile/consumer.ts | 43 ++----- .../shared/executors/translation-executor.ts | 8 +- .../e2e/tests/shared/resource-lifecycle.ts | 3 +- packages/sdk/e2e/tests/test-definitions.ts | 8 -- .../tests/translation-afriquegemma-tests.ts | 59 ---------- .../e2e/tests/translation-salamandra-tests.ts | 111 ------------------ 8 files changed, 27 insertions(+), 283 deletions(-) delete mode 100644 packages/sdk/e2e/tests/translation-afriquegemma-tests.ts delete mode 100644 packages/sdk/e2e/tests/translation-salamandra-tests.ts diff --git a/packages/sdk/e2e/tests/desktop/consumer.ts b/packages/sdk/e2e/tests/desktop/consumer.ts index c792ef9b14..26ccafe867 100644 --- a/packages/sdk/e2e/tests/desktop/consumer.ts +++ b/packages/sdk/e2e/tests/desktop/consumer.ts @@ -21,16 +21,14 @@ import { TTS_MULTILINGUAL_SUPERTONIC3_Q4_0, TTS_ENHANCER_LAVASR_FP16, TTS_DENOISER_LAVASR_FP16, - PARAKEET_TDT_0_6B_V3_Q8_0, - PARAKEET_CTC_0_6B_Q8_0, - PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, - PARAKEET_EOU_120M_V1_Q8_0, + PARAKEET_TDT_0_6B_V3_Q4_0, + PARAKEET_CTC_0_6B_Q4_0, + PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, + PARAKEET_EOU_120M_V1_Q4_0, SMOLVLA_LIBERO_VISION_Q8, PI05_BASE_Q_AGGRESSIVE, SMOLVLM2_500M_MULTIMODAL_Q8_0, MMPROJ_SMOLVLM2_500M_MULTIMODAL_Q8_0, - SALAMANDRATA_2B_INST_Q4, - AFRICAN_4B_TRANSLATION_Q4_K_M, FLUX_2_KLEIN_4B_Q4_0, FLUX_2_KLEIN_4B_VAE, QWEN3_4B_Q4_K_M, @@ -259,27 +257,6 @@ resources.define('bergamot-es-it-pivot', { } }) -resources.define('salamandra', { - constant: SALAMANDRATA_2B_INST_Q4, - type: 'llamacpp-completion' -}) - -resources.define('afriquegemma', { - constant: AFRICAN_4B_TRANSLATION_Q4_K_M, - type: 'llamacpp-completion', - config: { - tools: true, - ctx_size: 2048, - top_k: 1, - top_p: 1, - temp: 0, - repeat_penalty: 1, - seed: 42, - predict: 256, - stop_sequences: ['\n'] - } -}) - resources.define('tts-chatterbox', { constant: TTS_T3_TURBO_EN_CHATTERBOX_Q4_0, type: 'tts-ggml', @@ -348,25 +325,25 @@ resources.define('tts-supertonic-enhanced', { }) resources.define('parakeet-tdt', { - constant: PARAKEET_TDT_0_6B_V3_Q8_0, + constant: PARAKEET_TDT_0_6B_V3_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-ctc', { - constant: PARAKEET_CTC_0_6B_Q8_0, + constant: PARAKEET_CTC_0_6B_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-sortformer', { - constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, + constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-eou', { - constant: PARAKEET_EOU_120M_V1_Q8_0, + constant: PARAKEET_EOU_120M_V1_Q4_0, type: 'parakeet-transcription', config: {} }) diff --git a/packages/sdk/e2e/tests/electron/consumer.ts b/packages/sdk/e2e/tests/electron/consumer.ts index 6e1ef5be3b..23f5d33dcb 100644 --- a/packages/sdk/e2e/tests/electron/consumer.ts +++ b/packages/sdk/e2e/tests/electron/consumer.ts @@ -34,14 +34,12 @@ import { TTS_MULTILINGUAL_SUPERTONIC3_Q4_0, TTS_ENHANCER_LAVASR_FP16, TTS_DENOISER_LAVASR_FP16, - PARAKEET_TDT_0_6B_V3_Q8_0, - PARAKEET_CTC_0_6B_Q8_0, - PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, - PARAKEET_EOU_120M_V1_Q8_0, + PARAKEET_TDT_0_6B_V3_Q4_0, + PARAKEET_CTC_0_6B_Q4_0, + PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, + PARAKEET_EOU_120M_V1_Q4_0, SMOLVLM2_500M_MULTIMODAL_Q8_0, MMPROJ_SMOLVLM2_500M_MULTIMODAL_Q8_0, - SALAMANDRATA_2B_INST_Q4, - AFRICAN_4B_TRANSLATION_Q4_K_M, QWEN3_5_0_8B_MULTIMODAL_Q4_K_M, GEMMA4_2B_MULTIMODAL_Q4_K_M, BCI_WINDOWED @@ -241,27 +239,6 @@ resources.define('bergamot-es-it-pivot', { } }) -resources.define('salamandra', { - constant: SALAMANDRATA_2B_INST_Q4, - type: 'llamacpp-completion' -}) - -resources.define('afriquegemma', { - constant: AFRICAN_4B_TRANSLATION_Q4_K_M, - type: 'llamacpp-completion', - config: { - tools: true, - ctx_size: 2048, - top_k: 1, - top_p: 1, - temp: 0, - repeat_penalty: 1, - seed: 42, - predict: 256, - stop_sequences: ['\n'] - } -}) - resources.define('tts-chatterbox', { constant: TTS_T3_TURBO_EN_CHATTERBOX_Q4_0, type: 'tts-ggml', @@ -330,25 +307,25 @@ resources.define('tts-supertonic-enhanced', { }) resources.define('parakeet-tdt', { - constant: PARAKEET_TDT_0_6B_V3_Q8_0, + constant: PARAKEET_TDT_0_6B_V3_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-ctc', { - constant: PARAKEET_CTC_0_6B_Q8_0, + constant: PARAKEET_CTC_0_6B_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-sortformer', { - constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, + constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-eou', { - constant: PARAKEET_EOU_120M_V1_Q8_0, + constant: PARAKEET_EOU_120M_V1_Q4_0, type: 'parakeet-transcription', config: {} }) diff --git a/packages/sdk/e2e/tests/mobile/consumer.ts b/packages/sdk/e2e/tests/mobile/consumer.ts index 8954129e6e..8838c3a766 100644 --- a/packages/sdk/e2e/tests/mobile/consumer.ts +++ b/packages/sdk/e2e/tests/mobile/consumer.ts @@ -23,14 +23,12 @@ import { TTS_MULTILINGUAL_SUPERTONIC3_Q4_0, TTS_ENHANCER_LAVASR_FP16, TTS_DENOISER_LAVASR_FP16, - PARAKEET_TDT_0_6B_V3_Q8_0, - PARAKEET_CTC_0_6B_Q8_0, - PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, - PARAKEET_EOU_120M_V1_Q8_0, + PARAKEET_TDT_0_6B_V3_Q4_0, + PARAKEET_CTC_0_6B_Q4_0, + PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, + PARAKEET_EOU_120M_V1_Q4_0, SMOLVLM2_500M_MULTIMODAL_Q8_0, MMPROJ_SMOLVLM2_500M_MULTIMODAL_Q8_0, - SALAMANDRATA_2B_INST_Q4, - AFRICAN_4B_TRANSLATION_Q4_K_M, SMOLVLA_LIBERO_VISION_Q8 } from '@qvac/sdk' import { ResourceManager } from '../shared/resource-manager.js' @@ -237,27 +235,6 @@ resources.define('bergamot-es-it-pivot', { } }) -resources.define('salamandra', { - constant: SALAMANDRATA_2B_INST_Q4, - type: 'llamacpp-completion' -}) - -resources.define('afriquegemma', { - constant: AFRICAN_4B_TRANSLATION_Q4_K_M, - type: 'llamacpp-completion', - config: { - tools: true, - ctx_size: 2048, - top_k: 1, - top_p: 1, - temp: 0, - repeat_penalty: 1, - seed: 42, - predict: 256, - stop_sequences: ['\n'] - } -}) - /** Look up a bundled audio file by name and resolve it to a POSIX path. */ async function resolveBundledAudioUri(filename: string): Promise { // @ts-ignore - assets.ts generated at consumer build time (consumer root, 3 levels up from dist/tests/mobile/) @@ -343,25 +320,25 @@ resources.define('tts-supertonic-enhanced', { }) resources.define('parakeet-tdt', { - constant: PARAKEET_TDT_0_6B_V3_Q8_0, + constant: PARAKEET_TDT_0_6B_V3_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-ctc', { - constant: PARAKEET_CTC_0_6B_Q8_0, + constant: PARAKEET_CTC_0_6B_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-sortformer', { - constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q8_0, + constant: PARAKEET_SORTFORMER_4SPK_V2_1_Q4_0, type: 'parakeet-transcription', config: {} }) resources.define('parakeet-eou', { - constant: PARAKEET_EOU_120M_V1_Q8_0, + constant: PARAKEET_EOU_120M_V1_Q4_0, type: 'parakeet-transcription', config: {} }) @@ -556,10 +533,6 @@ export const executor = createExecutor({ ], 'OCR disabled on iOS (ONNX/CoreML OOM)' ), - new SkipExecutor( - /^translation-afriquegemma-/, - 'AfriqueGemma 4B (~2.7 GB) exceeds iOS memory budget' - ) ] : []), diff --git a/packages/sdk/e2e/tests/shared/executors/translation-executor.ts b/packages/sdk/e2e/tests/shared/executors/translation-executor.ts index c15c500676..e8a110fe80 100644 --- a/packages/sdk/e2e/tests/shared/executors/translation-executor.ts +++ b/packages/sdk/e2e/tests/shared/executors/translation-executor.ts @@ -4,8 +4,6 @@ import { AbstractModelExecutor } from './abstract-model-executor.js' import { translationIndicTransTests } from '../../translation-indictrans-tests.js' import { translationBergamotTests } from '../../translation-bergamot-tests.js' import { translationLlmTests } from '../../translation-llm-tests.js' -import { translationSalamandraTests } from '../../translation-salamandra-tests.js' -import { translationAfriquegemmaTests } from '../../translation-afriquegemma-tests.js' interface TranslateTestParams { text: string @@ -18,13 +16,11 @@ interface TranslateTestParams { const allTests = [ ...translationIndicTransTests, ...translationBergamotTests, - ...translationLlmTests, - ...translationSalamandraTests, - ...translationAfriquegemmaTests + ...translationLlmTests ] export class TranslationExecutor extends AbstractModelExecutor { - pattern = /^translation-(indictrans|bergamot|llm|salamandra|afriquegemma)-/ + pattern = /^translation-(indictrans|bergamot|llm)-/ protected handlers = Object.fromEntries( allTests.map((test) => { diff --git a/packages/sdk/e2e/tests/shared/resource-lifecycle.ts b/packages/sdk/e2e/tests/shared/resource-lifecycle.ts index ca90ed8c23..ba1c29d706 100644 --- a/packages/sdk/e2e/tests/shared/resource-lifecycle.ts +++ b/packages/sdk/e2e/tests/shared/resource-lifecycle.ts @@ -11,8 +11,7 @@ export async function modelSetup(resources: ResourceManager, context: unknown) { // Treat this as "evict everything currently held" — otherwise residue // from the previous test (e.g. a 2GB translation model) stays resident // while the next test allocates fresh memory on top of it, blowing the - // device memory budget on mobile (afriquegemma → sharded-model-load was - // the empirical case this manifested as). + // device memory budget on mobile. const deps = !dep || dep === 'none' ? [] : dep.includes('+') ? dep.split('+') : [dep] await resources.evictExcept(deps) diff --git a/packages/sdk/e2e/tests/test-definitions.ts b/packages/sdk/e2e/tests/test-definitions.ts index d53a612d44..c788ce865b 100644 --- a/packages/sdk/e2e/tests/test-definitions.ts +++ b/packages/sdk/e2e/tests/test-definitions.ts @@ -10,8 +10,6 @@ import { translationIndicTransTests } from './translation-indictrans-tests.js' import { translationBergamotTests } from './translation-bergamot-tests.js' import { translationBergamotCacheTests } from './translation-bergamot-cache-tests.js' import { translationLlmTests } from './translation-llm-tests.js' -import { translationSalamandraTests } from './translation-salamandra-tests.js' -import { translationAfriquegemmaTests } from './translation-afriquegemma-tests.js' import { modelInfoTests } from './model-info-tests.js' import { kvCacheTests } from './kv-cache-tests.js' import { errorTests } from './error-tests.js' @@ -240,12 +238,6 @@ export const tests = [ // Translation: LLM (open-vocabulary via from/to) ...translationLlmTests, - // Translation: Salamandra (EU languages) - ...translationSalamandraTests, - - // Translation: AfriqueGemma (African languages) - ...translationAfriquegemmaTests, - // Sharded model tests ...shardedModelTests, diff --git a/packages/sdk/e2e/tests/translation-afriquegemma-tests.ts b/packages/sdk/e2e/tests/translation-afriquegemma-tests.ts deleted file mode 100644 index cd3194e229..0000000000 --- a/packages/sdk/e2e/tests/translation-afriquegemma-tests.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { TestDefinition, Expectation } from '@tetherto/qvac-test-suite' - -const createAfriquegemmaTest = ( - testId: string, - text: string, - to: string, - expectation: Expectation, - opts: { from?: string; estimatedDurationMs?: number } = {}, - suites?: string[] -): TestDefinition => ({ - testId, - params: { - text, - to, - resource: 'afriquegemma', - ...(opts.from && { from: opts.from }) - }, - expectation, - ...(suites && { suites }), - metadata: { - category: 'translation-afriquegemma', - dependency: 'afriquegemma', - estimatedDurationMs: opts.estimatedDurationMs ?? 300000 - } -}) - -export const afriquegemmaEnSw = createAfriquegemmaTest( - 'translation-afriquegemma-en-sw', - 'Hello, how are you today?', - 'sw', - { validation: 'type', expectedType: 'string' }, - { from: 'en', estimatedDurationMs: 300000 } -) - -export const afriquegemmSwEn = createAfriquegemmaTest( - 'translation-afriquegemma-sw-en', - 'Habari yako leo?', - 'en', - { validation: 'contains-any', contains: ['hello', 'how', 'are', 'you', 'today', 'news'] }, - { from: 'sw' }, - ['smoke'] -) - -export const afriquegemmaStreaming: TestDefinition = { - testId: 'translation-afriquegemma-streaming', - params: { text: 'Hello, how are you today?', from: 'en', to: 'sw', resource: 'afriquegemma' }, - expectation: { validation: 'type', expectedType: 'string' }, - metadata: { - category: 'translation-afriquegemma', - dependency: 'afriquegemma', - estimatedDurationMs: 120000 - } -} - -export const translationAfriquegemmaTests = [ - afriquegemmaEnSw, - afriquegemmSwEn, - afriquegemmaStreaming -] diff --git a/packages/sdk/e2e/tests/translation-salamandra-tests.ts b/packages/sdk/e2e/tests/translation-salamandra-tests.ts deleted file mode 100644 index 8136bce580..0000000000 --- a/packages/sdk/e2e/tests/translation-salamandra-tests.ts +++ /dev/null @@ -1,111 +0,0 @@ -import type { TestDefinition, Expectation } from '@tetherto/qvac-test-suite' - -const createSalamandraTest = ( - testId: string, - text: string, - to: string, - expectation: Expectation, - opts: { from?: string; context?: string; estimatedDurationMs?: number } = {}, - suites?: string[] -): TestDefinition => ({ - testId, - params: { - text, - to, - resource: 'salamandra', - ...(opts.from && { from: opts.from }), - ...(opts.context && { context: opts.context }) - }, - expectation, - ...(suites && { suites }), - metadata: { - category: 'translation-salamandra', - dependency: 'salamandra', - estimatedDurationMs: opts.estimatedDurationMs ?? 300000 - } -}) - -export const salamandraEnEs = createSalamandraTest( - 'translation-salamandra-en-es', - 'Hello, how are you today?', - 'es', - { validation: 'contains-any', contains: ['hola', 'cómo', 'estás', 'hoy', 'buenos'] }, - { from: 'en' }, - ['smoke'] -) - -export const salamandraEsEn = createSalamandraTest( - 'translation-salamandra-es-en', - 'Buenos días, ¿cómo estás hoy?', - 'en', - { validation: 'contains-any', contains: ['good', 'morning', 'how', 'are', 'you', 'today'] }, - { from: 'es' } -) - -export const salamandraStreaming: TestDefinition = { - testId: 'translation-salamandra-streaming', - params: { text: 'Hello, how are you today?', from: 'en', to: 'es', resource: 'salamandra' }, - expectation: { validation: 'contains-any', contains: ['hola', 'cómo', 'estás', 'hoy', 'buenos'] }, - suites: ['smoke'], - metadata: { - category: 'translation-salamandra', - dependency: 'salamandra', - estimatedDurationMs: 30000 - } -} - -export const salamandraStats: TestDefinition = { - testId: 'translation-salamandra-stats', - params: { text: 'Hello world', from: 'en', to: 'es', resource: 'salamandra' }, - expectation: { validation: 'type', expectedType: 'string' }, - metadata: { - category: 'translation-salamandra', - dependency: 'salamandra', - estimatedDurationMs: 30000 - } -} - -export const salamandraAutodetect = createSalamandraTest( - 'translation-salamandra-autodetect', - "Bonjour, comment allez-vous aujourd'hui?", - 'en', - { validation: 'type', expectedType: 'string' } -) - -export const salamandraContext = createSalamandraTest( - 'translation-salamandra-context', - 'bank', - 'es', - { validation: 'type', expectedType: 'string' }, - { from: 'en', context: 'Use formal language, context is financial institution' } -) - -export const salamandraLongText = createSalamandraTest( - 'translation-salamandra-long-text', - 'The weather is beautiful today. I decided to go for a walk in the park. The birds are singing and the flowers are blooming. It is a perfect day to enjoy nature and relax.', - 'es', - { validation: 'type', expectedType: 'string' }, - { from: 'en', estimatedDurationMs: 45000 } -) - -export const salamandraEmptyText: TestDefinition = { - testId: 'translation-salamandra-empty-text', - params: { text: '', from: 'en', to: 'es', resource: 'salamandra' }, - expectation: { validation: 'type', expectedType: 'string' }, - metadata: { - category: 'translation-salamandra', - dependency: 'salamandra', - estimatedDurationMs: 15000 - } -} - -export const translationSalamandraTests = [ - salamandraEnEs, - salamandraEsEn, - salamandraStreaming, - salamandraStats, - salamandraAutodetect, - salamandraContext, - salamandraLongText, - salamandraEmptyText -] From 9dcef74013372a4ca8069aeacfaa37ab07b950d5 Mon Sep 17 00:00:00 2001 From: Victor Rodzko Date: Wed, 15 Jul 2026 14:00:04 +0300 Subject: [PATCH 2/2] test: fix prettier/linter issues --- packages/sdk/e2e/tests/mobile/consumer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/e2e/tests/mobile/consumer.ts b/packages/sdk/e2e/tests/mobile/consumer.ts index 8838c3a766..84953b9835 100644 --- a/packages/sdk/e2e/tests/mobile/consumer.ts +++ b/packages/sdk/e2e/tests/mobile/consumer.ts @@ -532,7 +532,7 @@ export const executor = createExecutor({ 'addon-logging-ocr' ], 'OCR disabled on iOS (ONNX/CoreML OOM)' - ), + ) ] : []),