Skip to content

Commit b9421ad

Browse files
committed
feat: Support DBRX model in Llama
1 parent 39679d9 commit b9421ad

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/main/java/ee/carlrobert/codegpt/completions/HuggingFaceModel.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ public enum HuggingFaceModel {
5252
LLAMA_3_8B_Q8_0(8, 8, "Meta-Llama-3-8B-Instruct-Q8_0.gguf", "lmstudio-community"),
5353
LLAMA_3_70B_IQ1(70, 1, "Meta-Llama-3-70B-Instruct-IQ1_M.gguf", "lmstudio-community"),
5454
LLAMA_3_70B_IQ2_XS(70, 2, "Meta-Llama-3-70B-Instruct-IQ2_XS.gguf", "lmstudio-community"),
55-
LLAMA_3_70B_Q4_K_M(70, 4, "Meta-Llama-3-70B-Instruct-Q4_K_M.gguf", "lmstudio-community");
55+
LLAMA_3_70B_Q4_K_M(70, 4, "Meta-Llama-3-70B-Instruct-Q4_K_M.gguf", "lmstudio-community"),
56+
57+
DBRX_12B_Q3_K_M(12, 3, "dbrx-16x12b-instruct-q3_k_m-gguf", "phymbert"),
58+
DBRX_12B_Q4_0(12, 4, "dbrx-16x12b-instruct-q4_0-gguf", "phymbert"),
59+
DBRX_12B_Q6_K(12, 6, "dbrx-16x12b-instruct-q6_k-gguf", "phymbert"),
60+
DBRX_12B_Q8_0(12, 8, "dbrx-16x12b-instruct-q8_0-gguf", "phymbert"),
61+
DBRX_12B_Q3_S(12, 3, "dbrx-16x12b-instruct-iq3_s-gguf", "phymbert"),
62+
DBRX_12B_Q3_XXS(12, 3, "dbrx-16x12b-instruct-iq3_xxs-gguf", "phymbert");
5663

5764
private final int parameterSize;
5865
private final int quantization;
@@ -86,7 +93,8 @@ public String getFileName() {
8693
if ("TheBloke".equals(user)) {
8794
return modelName.toLowerCase().replace("-gguf", format(".Q%d_K_M.gguf", quantization));
8895
}
89-
return modelName;
96+
// TODO: Download all 10 files ;(
97+
return modelName.toLowerCase().replace("-gguf", "-00001-of-00010.gguf");
9098
}
9199

92100
public URL getFileURL() {

src/main/java/ee/carlrobert/codegpt/completions/llama/LlamaModel.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,21 @@ public enum LlamaModel {
9999
HuggingFaceModel.LLAMA_3_8B_Q8_0,
100100
HuggingFaceModel.LLAMA_3_70B_IQ1,
101101
HuggingFaceModel.LLAMA_3_70B_IQ2_XS,
102-
HuggingFaceModel.LLAMA_3_70B_Q4_K_M));
102+
HuggingFaceModel.LLAMA_3_70B_Q4_K_M)),
103+
DBRX(
104+
"DBRX",
105+
"DBRX is a Mixture-of-Experts (MoE) model with 132B total parameters and 36B live parameters."
106+
+ "Generation speed is significantly faster than LLaMA2-70B, while at the same time "
107+
+ "beating other open source models, such as, LLaMA2-70B, Mixtral, and Grok-1 on "
108+
+ "language understanding, programming, math, and logic.",
109+
PromptTemplate.CHAT_ML,
110+
List.of(
111+
HuggingFaceModel.DBRX_12B_Q3_K_M,
112+
HuggingFaceModel.DBRX_12B_Q4_0,
113+
HuggingFaceModel.DBRX_12B_Q6_K,
114+
HuggingFaceModel.DBRX_12B_Q8_0,
115+
HuggingFaceModel.DBRX_12B_Q3_S,
116+
HuggingFaceModel.DBRX_12B_Q3_XXS));
103117

104118
private final String label;
105119
private final String description;

0 commit comments

Comments
 (0)