From c2481216e9ef093e07bbeaff54feea13e026ab9e Mon Sep 17 00:00:00 2001 From: RaymondWang0 Date: Thu, 18 Apr 2024 10:19:57 +0000 Subject: [PATCH] deploy: d46a858b7eab33e23efc376e1cf10b76459c8271 --- model_8h_source.html | 118 +++++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/model_8h_source.html b/model_8h_source.html index 1a2bc9e..c92248b 100644 --- a/model_8h_source.html +++ b/model_8h_source.html @@ -135,7 +135,7 @@
49};
50
-
51enum { OPT_125M, OPT_1_3B, OPT_6_7B, LLaMA_7B, LLaMA_13B, CodeLLaMA_7B, CodeLLaMA_13B, StarCoder_15_5B, LLaVA_7B, LLaVA_13B, VILA_7B, VILA_13B, Clip_ViT_Large };
+
51enum { OPT_125M, OPT_1_3B, OPT_6_7B, LLaMA_7B, LLaMA_13B, CodeLLaMA_7B, CodeLLaMA_13B, StarCoder_15_5B, LLaVA_7B, LLaVA_13B, VILA_2_7B, VILA_7B, VILA_13B, Clip_ViT_Large, Mistral_7B};
52enum { FP32, QINT8, INT4 };
53
54const struct model_config opt_6_7B(1, 32, 32, 2048, 4096, 16384, 50272, 1, 0);
@@ -148,60 +148,68 @@
61const struct model_config starcoder_15_5B(1, 48, 40, 2048, 6144, 24576, 49152, 1, 0);
62const struct model_config llava_7B(1, 32, 32, 2048, 4096, 11008, 32000, 1, 1e-5);
63const struct model_config llava_13B(1, 40, 40, 2048, 5120, 13824, 32000, 1, 1e-5);
-
64const struct model_config vila_7B(1, 32, 32, 2048, 4096, 11008, 32000, 1, 1e-5);
-
65const struct model_config vila_13B(1, 40, 40, 2048, 5120, 13824, 32000, 1, 1e-5);
-
66const struct model_config clip_vit_large(1, 16, 23, 2048, 1024, 4096, 0, 1, 0, 336, 14, 768, 4096); // llava's and vila's clip model uses only 23 layers out of 24
-
67
-
68static struct model_config get_opt_model_config(int choise) {
-
69 struct model_config ret;
-
70 switch (choise) {
-
71 case OPT_125M:
-
72 ret = opt_125m;
-
73 break;
-
74 case OPT_1_3B:
-
75 ret = opt_1_3B;
-
76 break;
-
77 case OPT_6_7B:
-
78 ret = opt_6_7B;
-
79 break;
-
80 case LLaMA_7B:
-
81 ret = llama_7B;
-
82 break;
-
83 case LLaMA_13B:
-
84 ret = llama_13B;
-
85 break;
-
86 case CodeLLaMA_7B:
-
87 ret = codellama_7B;
-
88 break;
-
89 case CodeLLaMA_13B:
-
90 ret = codellama_13B;
-
91 break;
-
92 case StarCoder_15_5B:
-
93 ret = starcoder_15_5B;
-
94 break;
-
95 case LLaVA_7B:
-
96 ret = llava_7B;
-
97 break;
-
98 case LLaVA_13B:
-
99 ret = llava_13B;
-
100 break;
-
101 case VILA_7B:
-
102 ret = vila_7B;
-
103 break;
-
104 case VILA_13B:
-
105 ret = vila_13B;
-
106 break;
-
107 case Clip_ViT_Large:
-
108 ret = clip_vit_large;
-
109 break;
-
110 default:
-
111 throw("Unsupported model choice.");
-
112 break;
-
113 }
-
114 return ret;
-
115}
-
116
-
117#endif
+
64const struct model_config vila_2_7B(1, 20, 32, 2048, 2560, 6912, 32000, 1, 1e-5);
+
65const struct model_config vila_7B(1, 32, 32, 2048, 4096, 11008, 32000, 1, 1e-5);
+
66const struct model_config vila_13B(1, 40, 40, 2048, 5120, 13824, 32000, 1, 1e-5);
+
67const struct model_config clip_vit_large(1, 16, 23, 2048, 1024, 4096, 0, 1, 0, 336, 14, 768, 4096); // llava's and vila's clip model uses only 23 layers out of 24
+
68const struct model_config mistral_7B(1, 32, 32, 2048, 4096, 11008, 32000, 1, 1e-6);
+
69
+
70static struct model_config get_opt_model_config(int choise) {
+
71 struct model_config ret;
+
72 switch (choise) {
+
73 case OPT_125M:
+
74 ret = opt_125m;
+
75 break;
+
76 case OPT_1_3B:
+
77 ret = opt_1_3B;
+
78 break;
+
79 case OPT_6_7B:
+
80 ret = opt_6_7B;
+
81 break;
+
82 case LLaMA_7B:
+
83 ret = llama_7B;
+
84 break;
+
85 case LLaMA_13B:
+
86 ret = llama_13B;
+
87 break;
+
88 case CodeLLaMA_7B:
+
89 ret = codellama_7B;
+
90 break;
+
91 case CodeLLaMA_13B:
+
92 ret = codellama_13B;
+
93 break;
+
94 case StarCoder_15_5B:
+
95 ret = starcoder_15_5B;
+
96 break;
+
97 case LLaVA_7B:
+
98 ret = llava_7B;
+
99 break;
+
100 case LLaVA_13B:
+
101 ret = llava_13B;
+
102 break;
+
103 case VILA_2_7B:
+
104 ret = vila_2_7B;
+
105 break;
+
106 case VILA_7B:
+
107 ret = vila_7B;
+
108 break;
+
109 case VILA_13B:
+
110 ret = vila_13B;
+
111 break;
+
112 case Clip_ViT_Large:
+
113 ret = clip_vit_large;
+
114 break;
+
115 case Mistral_7B:
+
116 ret = mistral_7B;
+
117 break;
+
118 default:
+
119 throw("Unsupported model choice.");
+
120 break;
+
121 }
+
122 return ret;
+
123}
+
124
+
125#endif
Definition model.h:5