Merge pull request #3408 from conornash/update_groq_models_20250201 Update Groq models
Signed| @@ -3155,34 +3155,22 @@ | |||
| 3155 | </div> | 3155 | </div> |
| 3156 | <h4 data-i18n="Groq Model">Groq Model</h4> | 3156 | <h4 data-i18n="Groq Model">Groq Model</h4> |
| 3157 | <select id="model_groq_select"> | 3157 | <select id="model_groq_select"> |
| 3158 | <optgroup label="Llama 3.3"> | 3158 | <optgroup label="Production Models"> |
| 3159 | <option value="gemma2-9b-it">gemma2-9b-it</option> | ||
| 3159 | <option value="llama-3.3-70b-versatile">llama-3.3-70b-versatile</option> | 3160 | <option value="llama-3.3-70b-versatile">llama-3.3-70b-versatile</option> |
| 3161 | <option value="llama-3.1-8b-instant">llama-3.1-8b-instant</option> | ||
| 3162 | <option value="llama3-70b-8192">llama3-70b-8192</option> | ||
| 3163 | <option value="llama3-8b-8192">llama3-8b-8192</option> | ||
| 3164 | <option value="mixtral-8x7b-32768">mixtral-8x7b-32768</option> | ||
| 3160 | </optgroup> | 3165 | </optgroup> |
| 3161 | <optgroup label="Llama 3.2"> | 3166 | <optgroup label="Preview Models"> |
| 3167 | <option value="deepseek-r1-distill-llama-70b">deepseek-r1-distill-llama-70b</option> | ||
| 3168 | <option value="llama-3.3-70b-specdec">llama-3.3-70b-specdec</option> | ||
| 3162 | <option value="llama-3.2-1b-preview">llama-3.2-1b-preview</option> | 3169 | <option value="llama-3.2-1b-preview">llama-3.2-1b-preview</option> |
| 3163 | <option value="llama-3.2-3b-preview">llama-3.2-3b-preview</option> | 3170 | <option value="llama-3.2-3b-preview">llama-3.2-3b-preview</option> |
| 3164 | <option value="llama-3.2-11b-vision-preview">llama-3.2-11b-vision-preview</option> | 3171 | <option value="llama-3.2-11b-vision-preview">llama-3.2-11b-vision-preview</option> |
| 3165 | <option value="llama-3.2-90b-vision-preview">llama-3.2-90b-vision-preview</option> | 3172 | <option value="llama-3.2-90b-vision-preview">llama-3.2-90b-vision-preview</option> |
| 3166 | </optgroup> | 3173 | </optgroup> |
| 3167 | <optgroup label="Llama 3.1"> | ||
| 3168 | <option value="llama-3.1-8b-instant">llama-3.1-8b-instant</option> | ||
| 3169 | <option value="llama-3.1-70b-versatile">llama-3.1-70b-versatile</option> | ||
| 3170 | <option value="llama-3.1-405b-reasoning">llama-3.1-405b-reasoning</option> | ||
| 3171 | </optgroup> | ||
| 3172 | <optgroup label="Llama 3"> | ||
| 3173 | <option value="llama3-groq-8b-8192-tool-use-preview">llama3-groq-8b-8192-tool-use-preview</option> | ||
| 3174 | <option value="llama3-groq-70b-8192-tool-use-preview">llama3-groq-70b-8192-tool-use-preview</option> | ||
| 3175 | <option value="llama3-8b-8192">llama3-8b-8192</option> | ||
| 3176 | <option value="llama3-70b-8192">llama3-70b-8192</option> | ||
| 3177 | </optgroup> | ||
| 3178 | <optgroup label="Gemma"> | ||
| 3179 | <option value="gemma-7b-it">gemma-7b-it</option> | ||
| 3180 | <option value="gemma2-9b-it">gemma2-9b-it</option> | ||
| 3181 | </optgroup> | ||
| 3182 | <optgroup label="Other"> | ||
| 3183 | <option value="mixtral-8x7b-32768">mixtral-8x7b-32768</option> | ||
| 3184 | <option value="llava-v1.5-7b-4096-preview">llava-v1.5-7b-4096-preview</option> | ||
| 3185 | </optgroup> | ||
| 3186 | </select> | 3174 | </select> |
| 3187 | </div> | 3175 | </div> |
| 3188 | <div id="nanogpt_form" data-source="nanogpt"> | 3176 | <div id="nanogpt_form" data-source="nanogpt"> |
| @@ -259,7 +259,7 @@ const default_settings = { | |||
| 259 | mistralai_model: 'mistral-large-latest', | 259 | mistralai_model: 'mistral-large-latest', |
| 260 | cohere_model: 'command-r-plus', | 260 | cohere_model: 'command-r-plus', |
| 261 | perplexity_model: 'sonar-pro', | 261 | perplexity_model: 'sonar-pro', |
| 262 | groq_model: 'llama-3.1-70b-versatile', | 262 | groq_model: 'llama-3.3-70b-versatile', |
| 263 | nanogpt_model: 'gpt-4o-mini', | 263 | nanogpt_model: 'gpt-4o-mini', |
| 264 | zerooneai_model: 'yi-large', | 264 | zerooneai_model: 'yi-large', |
| 265 | blockentropy_model: 'be-70b-base-llama3.1', | 265 | blockentropy_model: 'be-70b-base-llama3.1', |
| @@ -4403,24 +4403,30 @@ async function onModelChange() { | |||
| 4403 | if (oai_settings.chat_completion_source == chat_completion_sources.GROQ) { | 4403 | if (oai_settings.chat_completion_source == chat_completion_sources.GROQ) { |
| 4404 | if (oai_settings.max_context_unlocked) { | 4404 | if (oai_settings.max_context_unlocked) { |
| 4405 | $('#openai_max_context').attr('max', unlocked_max); | 4405 | $('#openai_max_context').attr('max', unlocked_max); |
| 4406 | } | 4406 | } else if (oai_settings.groq_model.includes('gemma2-9b-it')) { |
| 4407 | else if (oai_settings.groq_model.includes('llama-3.2') && oai_settings.groq_model.includes('-preview')) { | ||
| 4408 | $('#openai_max_context').attr('max', max_8k); | 4407 | $('#openai_max_context').attr('max', max_8k); |
| 4409 | } | 4408 | } else if (oai_settings.groq_model.includes('llama-3.3-70b-versatile')) { |
| 4410 | else if (oai_settings.groq_model.includes('llama-3.3') || oai_settings.groq_model.includes('llama-3.2') || oai_settings.groq_model.includes('llama-3.1')) { | ||
| 4411 | $('#openai_max_context').attr('max', max_128k); | 4409 | $('#openai_max_context').attr('max', max_128k); |
| 4412 | } | 4410 | } else if (oai_settings.groq_model.includes('llama-3.1-8b-instant')) { |
| 4413 | else if (oai_settings.groq_model.includes('llama3-groq')) { | 4411 | $('#openai_max_context').attr('max', max_128k); |
| 4412 | } else if (oai_settings.groq_model.includes('llama3-70b-8192')) { | ||
| 4414 | $('#openai_max_context').attr('max', max_8k); | 4413 | $('#openai_max_context').attr('max', max_8k); |
| 4415 | } | 4414 | } else if (oai_settings.groq_model.includes('llama3-8b-8192')) { |
| 4416 | else if (['llama3-8b-8192', 'llama3-70b-8192', 'gemma-7b-it', 'gemma2-9b-it'].includes(oai_settings.groq_model)) { | ||
| 4417 | $('#openai_max_context').attr('max', max_8k); | 4415 | $('#openai_max_context').attr('max', max_8k); |
| 4418 | } | 4416 | } else if (oai_settings.groq_model.includes('mixtral-8x7b-32768')) { |
| 4419 | else if (['mixtral-8x7b-32768'].includes(oai_settings.groq_model)) { | ||
| 4420 | $('#openai_max_context').attr('max', max_32k); | 4417 | $('#openai_max_context').attr('max', max_32k); |
| 4421 | } | 4418 | } else if (oai_settings.groq_model.includes('deepseek-r1-distill-llama-70b')) { |
| 4422 | else { | 4419 | $('#openai_max_context').attr('max', max_128k); |
| 4423 | $('#openai_max_context').attr('max', max_4k); | 4420 | } else if (oai_settings.groq_model.includes('llama-3.3-70b-specdec')) { |
| 4421 | $('#openai_max_context').attr('max', max_8k); | ||
| 4422 | } else if (oai_settings.groq_model.includes('llama-3.2-1b-preview')) { | ||
| 4423 | $('#openai_max_context').attr('max', max_128k); | ||
| 4424 | } else if (oai_settings.groq_model.includes('llama-3.2-3b-preview')) { | ||
| 4425 | $('#openai_max_context').attr('max', max_128k); | ||
| 4426 | } else if (oai_settings.groq_model.includes('llama-3.2-11b-vision-preview')) { | ||
| 4427 | $('#openai_max_context').attr('max', max_128k); | ||
| 4428 | } else if (oai_settings.groq_model.includes('llama-3.2-90b-vision-preview')) { | ||
| 4429 | $('#openai_max_context').attr('max', max_128k); | ||
| 4424 | } | 4430 | } |
| 4425 | oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); | 4431 | oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); |
| 4426 | $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); | 4432 | $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); |