From d016f0ddf9c375577a444b1de6aa8ea88d5b4cc5 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Thu, 3 Sep 2026 08:10:07 +0000 Subject: [PATCH] feat: add nvidia/google/gemma-4-31b-it --- models/nvidia/gemma-4-31b-it.yaml | 65 ++++++++++++++ .../src/modelparams/_generated/catalog.json | 87 +++++++++++++++++++ .../src/modelparams/_generated/model_ids.py | 2 + .../src/modelparams/_generated/registry.py | 1 + .../src/modelparams/types/nvidia.py | 16 ++++ packages/modelparams/src/generated/data.ts | 87 +++++++++++++++++++ .../modelparams/src/generated/defaults.ts | 8 ++ .../modelparams/src/generated/model-ids.ts | 1 + .../modelparams/src/generated/params-by-id.ts | 9 ++ 9 files changed, 276 insertions(+) create mode 100644 models/nvidia/gemma-4-31b-it.yaml diff --git a/models/nvidia/gemma-4-31b-it.yaml b/models/nvidia/gemma-4-31b-it.yaml new file mode 100644 index 00000000..590e283d --- /dev/null +++ b/models/nvidia/gemma-4-31b-it.yaml @@ -0,0 +1,65 @@ +# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json +provider: nvidia +authType: api_key +apiSurface: openai-chat-completions +model: gemma-4-31b-it +wireId: google/gemma-4-31b-it +params: + - path: temperature + type: number + label: Temperature + description: Controls randomness. Lower values make outputs more focused; higher values make them more varied. Not recommended to modify both temperature and top_p in the same call. + default: 0.6 + range: + min: 0 + max: 1 + group: sampling + - path: top_p + type: number + label: Top P + description: Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. Not recommended to modify both temperature and top_p in the same call. + default: 0.95 + range: + max: 1 + group: sampling + - path: max_tokens + type: integer + label: Max tokens + description: Maximum number of tokens to generate. Generation stops when this limit is reached. + default: 4096 + range: + min: 1 + max: 16384 + group: generation_length + - path: frequency_penalty + type: number + label: Frequency penalty + description: Penalizes new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. + default: 0 + range: + min: -2 + max: 2 + group: sampling + - path: presence_penalty + type: number + label: Presence penalty + description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. + default: 0 + range: + min: -2 + max: 2 + group: sampling + - path: seed + type: integer + label: Seed + description: Best-effort deterministic sampling seed. Changing the seed produces a different response with similar characteristics. Fix the seed to reproduce results. + default: 0 + range: + min: 0 + max: 18446744073709552000 + group: sampling + - path: stop + type: string + label: Stop + description: A string or list of strings where the API will stop generating further tokens. The returned text will not contain the stop sequence. + group: generation_length diff --git a/packages/modelparams-python/src/modelparams/_generated/catalog.json b/packages/modelparams-python/src/modelparams/_generated/catalog.json index 522ab6f3..3645779c 100644 --- a/packages/modelparams-python/src/modelparams/_generated/catalog.json +++ b/packages/modelparams-python/src/modelparams/_generated/catalog.json @@ -22168,6 +22168,93 @@ } ] }, + { + "provider": "nvidia", + "authType": "api_key", + "apiSurface": "openai-chat-completions", + "model": "gemma-4-31b-it", + "wireId": "google/gemma-4-31b-it", + "params": [ + { + "path": "temperature", + "label": "Temperature", + "description": "Controls randomness. Lower values make outputs more focused; higher values make them more varied. Not recommended to modify both temperature and top_p in the same call.", + "group": "sampling", + "type": "number", + "default": 0.6, + "range": { + "min": 0, + "max": 1 + } + }, + { + "path": "top_p", + "label": "Top P", + "description": "Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. Not recommended to modify both temperature and top_p in the same call.", + "group": "sampling", + "type": "number", + "default": 0.95, + "range": { + "max": 1 + } + }, + { + "path": "max_tokens", + "label": "Max tokens", + "description": "Maximum number of tokens to generate. Generation stops when this limit is reached.", + "group": "generation_length", + "type": "integer", + "default": 4096, + "range": { + "min": 1, + "max": 16384 + } + }, + { + "path": "frequency_penalty", + "label": "Frequency penalty", + "description": "Penalizes new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2 + } + }, + { + "path": "presence_penalty", + "label": "Presence penalty", + "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2 + } + }, + { + "path": "seed", + "label": "Seed", + "description": "Best-effort deterministic sampling seed. Changing the seed produces a different response with similar characteristics. Fix the seed to reproduce results.", + "group": "sampling", + "type": "integer", + "default": 0, + "range": { + "min": 0, + "max": 18446744073709552000 + } + }, + { + "path": "stop", + "label": "Stop", + "description": "A string or list of strings where the API will stop generating further tokens. The returned text will not contain the stop sequence.", + "group": "generation_length", + "type": "string" + } + ] + }, { "provider": "nvidia", "authType": "api_key", diff --git a/packages/modelparams-python/src/modelparams/_generated/model_ids.py b/packages/modelparams-python/src/modelparams/_generated/model_ids.py index 14f88791..84477161 100644 --- a/packages/modelparams-python/src/modelparams/_generated/model_ids.py +++ b/packages/modelparams-python/src/modelparams/_generated/model_ids.py @@ -272,6 +272,7 @@ "moonshot/moonshot-v1-8k", "nvidia/deepseek-v4-flash-0731", "nvidia/deepseek-v4-pro-0813", + "nvidia/gemma-4-31b-it", "nvidia/gliner-pii", "nvidia/llama-3.1-nemoguard-8b-topic-control", "nvidia/llama-3.1-nemotron-nano-8b-v1", @@ -677,6 +678,7 @@ "moonshot/moonshot-v1-8k", "nvidia/deepseek-v4-flash-0731", "nvidia/deepseek-v4-pro-0813", + "nvidia/gemma-4-31b-it", "nvidia/gliner-pii", "nvidia/llama-3.1-nemoguard-8b-topic-control", "nvidia/llama-3.1-nemotron-nano-8b-v1", diff --git a/packages/modelparams-python/src/modelparams/_generated/registry.py b/packages/modelparams-python/src/modelparams/_generated/registry.py index 2fabc57e..cbc0f9e7 100644 --- a/packages/modelparams-python/src/modelparams/_generated/registry.py +++ b/packages/modelparams-python/src/modelparams/_generated/registry.py @@ -297,6 +297,7 @@ "moonshot/moonshot-v1-8k": moonshot.Moonshot_V1_8kParams, "nvidia/deepseek-v4-flash-0731": nvidia.Deepseek_V4_Flash_0731Params, "nvidia/deepseek-v4-pro-0813": nvidia.Deepseek_V4_Pro_0813Params, + "nvidia/gemma-4-31b-it": nvidia.Gemma_4_31b_ItParams, "nvidia/gliner-pii": nvidia.Gliner_PiiParams, "nvidia/llama-3.1-nemoguard-8b-topic-control": nvidia.Llama_3_1_Nemoguard_8b_Topic_ControlParams, "nvidia/llama-3.1-nemotron-nano-8b-v1": nvidia.Llama_3_1_Nemotron_Nano_8b_V1Params, diff --git a/packages/modelparams-python/src/modelparams/types/nvidia.py b/packages/modelparams-python/src/modelparams/types/nvidia.py index edd1551b..ce060f83 100644 --- a/packages/modelparams-python/src/modelparams/types/nvidia.py +++ b/packages/modelparams-python/src/modelparams/types/nvidia.py @@ -40,6 +40,21 @@ ) setattr(Deepseek_V4_Pro_0813Params, "__pydantic_config__", _PARAMS_CONFIG) +Gemma_4_31b_ItParams = TypedDict( + "Gemma_4_31b_ItParams", + { + "temperature": Annotated[float, Field(ge=0, le=1)], + "top_p": Annotated[float, Field(le=1)], + "max_tokens": Annotated[int, Field(ge=1, le=16384)], + "frequency_penalty": Annotated[float, Field(ge=-2, le=2)], + "presence_penalty": Annotated[float, Field(ge=-2, le=2)], + "seed": Annotated[int, Field(ge=0, le=18446744073709552000)], + "stop": str, + }, + total=False, +) +setattr(Gemma_4_31b_ItParams, "__pydantic_config__", _PARAMS_CONFIG) + Gliner_PiiParams = TypedDict( "Gliner_PiiParams", { @@ -257,6 +272,7 @@ __all__ = [ "Deepseek_V4_Flash_0731Params", "Deepseek_V4_Pro_0813Params", + "Gemma_4_31b_ItParams", "Gliner_PiiParams", "Llama_3_1_Nemoguard_8b_Topic_ControlParams", "Llama_3_1_Nemotron_Nano_8b_V1Params", diff --git a/packages/modelparams/src/generated/data.ts b/packages/modelparams/src/generated/data.ts index 5146335e..786c090f 100644 --- a/packages/modelparams/src/generated/data.ts +++ b/packages/modelparams/src/generated/data.ts @@ -22173,6 +22173,93 @@ const GENERATED_CATALOG = [ } ] }, + { + "provider": "nvidia", + "authType": "api_key", + "apiSurface": "openai-chat-completions", + "model": "gemma-4-31b-it", + "wireId": "google/gemma-4-31b-it", + "params": [ + { + "path": "temperature", + "label": "Temperature", + "description": "Controls randomness. Lower values make outputs more focused; higher values make them more varied. Not recommended to modify both temperature and top_p in the same call.", + "group": "sampling", + "type": "number", + "default": 0.6, + "range": { + "min": 0, + "max": 1 + } + }, + { + "path": "top_p", + "label": "Top P", + "description": "Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. Not recommended to modify both temperature and top_p in the same call.", + "group": "sampling", + "type": "number", + "default": 0.95, + "range": { + "max": 1 + } + }, + { + "path": "max_tokens", + "label": "Max tokens", + "description": "Maximum number of tokens to generate. Generation stops when this limit is reached.", + "group": "generation_length", + "type": "integer", + "default": 4096, + "range": { + "min": 1, + "max": 16384 + } + }, + { + "path": "frequency_penalty", + "label": "Frequency penalty", + "description": "Penalizes new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2 + } + }, + { + "path": "presence_penalty", + "label": "Presence penalty", + "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "group": "sampling", + "type": "number", + "default": 0, + "range": { + "min": -2, + "max": 2 + } + }, + { + "path": "seed", + "label": "Seed", + "description": "Best-effort deterministic sampling seed. Changing the seed produces a different response with similar characteristics. Fix the seed to reproduce results.", + "group": "sampling", + "type": "integer", + "default": 0, + "range": { + "min": 0, + "max": 18446744073709552000 + } + }, + { + "path": "stop", + "label": "Stop", + "description": "A string or list of strings where the API will stop generating further tokens. The returned text will not contain the stop sequence.", + "group": "generation_length", + "type": "string" + } + ] + }, { "provider": "nvidia", "authType": "api_key", diff --git a/packages/modelparams/src/generated/defaults.ts b/packages/modelparams/src/generated/defaults.ts index 823050b2..0c6d8c2b 100644 --- a/packages/modelparams/src/generated/defaults.ts +++ b/packages/modelparams/src/generated/defaults.ts @@ -1312,6 +1312,14 @@ export const DEFAULTS = { presence_penalty: 0, seed: 0, }, + "nvidia/gemma-4-31b-it": { + temperature: 0.6, + top_p: 0.95, + max_tokens: 4096, + frequency_penalty: 0, + presence_penalty: 0, + seed: 0, + }, "nvidia/gliner-pii": { threshold: 0.5, chunk_length: 384, diff --git a/packages/modelparams/src/generated/model-ids.ts b/packages/modelparams/src/generated/model-ids.ts index 488e5e3b..561186f0 100644 --- a/packages/modelparams/src/generated/model-ids.ts +++ b/packages/modelparams/src/generated/model-ids.ts @@ -270,6 +270,7 @@ export const MODEL_IDS = [ "moonshot/moonshot-v1-8k", "nvidia/deepseek-v4-flash-0731", "nvidia/deepseek-v4-pro-0813", + "nvidia/gemma-4-31b-it", "nvidia/gliner-pii", "nvidia/llama-3.1-nemoguard-8b-topic-control", "nvidia/llama-3.1-nemotron-nano-8b-v1", diff --git a/packages/modelparams/src/generated/params-by-id.ts b/packages/modelparams/src/generated/params-by-id.ts index 2f707577..467780eb 100644 --- a/packages/modelparams/src/generated/params-by-id.ts +++ b/packages/modelparams/src/generated/params-by-id.ts @@ -2196,6 +2196,15 @@ export type ParamsById = { seed: number; stop: string; }; + "nvidia/gemma-4-31b-it": { + temperature: number; + top_p: number; + max_tokens: number; + frequency_penalty: number; + presence_penalty: number; + seed: number; + stop: string; + }; "nvidia/gliner-pii": { threshold: number; chunk_length: number;