From 3e6631312dc74dd1686e009053c7c1f836cf15b3 Mon Sep 17 00:00:00 2001 From: Josh Feng Date: Sat, 13 Apr 2024 13:10:32 +0800 Subject: [PATCH] Add nvidia codegemma 7b (#3437) --- .../model_providers/nvidia/llm/_position.yaml | 1 + .../nvidia/llm/codegemma-7b.yaml | 30 +++++++++++++++++++ .../model_providers/nvidia/llm/llm.py | 1 + 3 files changed, 32 insertions(+) create mode 100644 api/core/model_runtime/model_providers/nvidia/llm/codegemma-7b.yaml diff --git a/api/core/model_runtime/model_providers/nvidia/llm/_position.yaml b/api/core/model_runtime/model_providers/nvidia/llm/_position.yaml index 78ab4cb93e..51e71920e8 100644 --- a/api/core/model_runtime/model_providers/nvidia/llm/_position.yaml +++ b/api/core/model_runtime/model_providers/nvidia/llm/_position.yaml @@ -1,4 +1,5 @@ - google/gemma-7b +- google/codegemma-7b - meta/llama2-70b - mistralai/mixtral-8x7b-instruct-v0.1 - fuyu-8b diff --git a/api/core/model_runtime/model_providers/nvidia/llm/codegemma-7b.yaml b/api/core/model_runtime/model_providers/nvidia/llm/codegemma-7b.yaml new file mode 100644 index 0000000000..ae94b14220 --- /dev/null +++ b/api/core/model_runtime/model_providers/nvidia/llm/codegemma-7b.yaml @@ -0,0 +1,30 @@ +model: google/codegemma-7b +label: + zh_Hans: google/codegemma-7b + en_US: google/codegemma-7b +model_type: llm +features: + - agent-thought +model_properties: + mode: chat + context_size: 8192 +parameter_rules: + - name: temperature + use_template: temperature + - name: top_p + use_template: top_p + - name: max_tokens + use_template: max_tokens + default: 1024 + min: 1 + max: 1024 + - name: frequency_penalty + use_template: frequency_penalty + min: -2 + max: 2 + default: 0 + - name: presence_penalty + use_template: presence_penalty + min: -2 + max: 2 + default: 0 diff --git a/api/core/model_runtime/model_providers/nvidia/llm/llm.py b/api/core/model_runtime/model_providers/nvidia/llm/llm.py index 5d05e606b0..81291bf6c4 100644 --- a/api/core/model_runtime/model_providers/nvidia/llm/llm.py +++ b/api/core/model_runtime/model_providers/nvidia/llm/llm.py @@ -24,6 +24,7 @@ class NVIDIALargeLanguageModel(OAIAPICompatLargeLanguageModel): 'fuyu-8b': 'vlm/adept/fuyu-8b', 'mistralai/mixtral-8x7b-instruct-v0.1': '', 'google/gemma-7b': '', + 'google/codegemma-7b': '', 'meta/llama2-70b': '' }