feat: Support Codestral 22B 32K (#587)

This commit is contained in:
Rene Leonhardt 2024-06-03 10:22:39 +02:00 committed by GitHub
parent f260a71d1b
commit ea6b1c8538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 79 additions and 3 deletions

View file

@ -1,5 +1,6 @@
package ee.carlrobert.codegpt.completions;
import static ee.carlrobert.codegpt.completions.HuggingFaceModel.Model.CST;
import static ee.carlrobert.codegpt.completions.HuggingFaceModel.Model.P3M;
import static ee.carlrobert.codegpt.completions.HuggingFaceModel.Model.SC3;
import static ee.carlrobert.codegpt.completions.llama.LlamaModel.getDownloadedMarker;
@ -132,11 +133,18 @@ public enum HuggingFaceModel {
PHI_3_14B_128K_Q5_K_M(P3M, 5, "Phi-3-medium-128k-instruct-Q5_K_M.gguf", 10.1),
PHI_3_14B_128K_Q6_K(P3M, 6, "Phi-3-medium-128k-instruct-Q6_K.gguf", 11.5),
PHI_3_14B_128K_Q8_0(P3M, 8, "Phi-3-medium-128k-instruct-Q8_0.gguf", 14.8),
CODESTRAL_22B_32K_Q3_K_M(CST, 3, "Codestral-22B-v0.1-Q3_K_M.gguf", 10.8),
CODESTRAL_22B_32K_Q4_K_M(CST, 4, "Codestral-22B-v0.1-Q4_K_M.gguf", 13.3),
CODESTRAL_22B_32K_Q5_K_M(CST, 5, "Codestral-22B-v0.1-Q5_K_M.gguf", 15.7),
CODESTRAL_22B_32K_Q6_K(CST, 6, "Codestral-22B-v0.1-Q6_K.gguf", 18.3),
CODESTRAL_22B_32K_Q8_0(CST, 8, "Codestral-22B-v0.1-Q8_0.gguf", 23.6),
;
enum Model {
SC3("bartowski", 3, "stable-code-instruct-3b-GGUF"),
P3M("bartowski", 14, "Phi-3-medium-128k-instruct-GGUF")
P3M("bartowski", 14, "Phi-3-medium-128k-instruct-GGUF"),
CST("bartowski", 22, "Codestral-22B-v0.1-GGUF"),
;
private final String user;

View file

@ -188,6 +188,24 @@ public enum LlamaModel {
HuggingFaceModel.STABLE_CODE_3B_Q5_K_M,
HuggingFaceModel.STABLE_CODE_3B_Q6_K,
HuggingFaceModel.STABLE_CODE_3B_Q8_0)),
CODESTRAL(
"Codestral", """
Codestral is an open-weight generative AI model explicitly designed for code generation \
tasks. It helps developers write and interact with code through a shared instruction and \
completion API endpoint. As it masters code and English, it can be used to design advanced \
AI applications for software developers. Codestral is trained on a diverse dataset of 80+ \
programming languages. Codestral saves developers time and effort: it can complete coding \
functions, write tests, and complete any partial code using a fill-in-the-middle mechanism. \
Interacting with Codestral will help level up the developers coding game and reduce the \
risk of errors and bugs.""",
PromptTemplate.MIXTRAL_INSTRUCT,
InfillPromptTemplate.CODE_GEMMA,
List.of(
HuggingFaceModel.CODESTRAL_22B_32K_Q3_K_M,
HuggingFaceModel.CODESTRAL_22B_32K_Q4_K_M,
HuggingFaceModel.CODESTRAL_22B_32K_Q5_K_M,
HuggingFaceModel.CODESTRAL_22B_32K_Q6_K,
HuggingFaceModel.CODESTRAL_22B_32K_Q8_0)),
;
private final String label;