File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1092,7 +1092,7 @@ class AddonContext : public Napi::ObjectWrap<AddonContext> {
1092
1092
return info.Env ().Undefined ();
1093
1093
}
1094
1094
1095
- return Napi::Number::From (info.Env (), llama_get_state_size (ctx));
1095
+ return Napi::Number::From (info.Env (), llama_state_get_size (ctx));
1096
1096
}
1097
1097
1098
1098
Napi::Value PrintTimings (const Napi::CallbackInfo& info) {
@@ -1220,7 +1220,7 @@ class AddonContextLoadContextWorker : public Napi::AsyncWorker {
1220
1220
}
1221
1221
void OnOK () {
1222
1222
if (context->contextLoaded ) {
1223
- uint64_t contextMemorySize = llama_get_state_size (context->ctx );
1223
+ uint64_t contextMemorySize = llama_state_get_size (context->ctx );
1224
1224
adjustNapiExternalMemoryAdd (Env (), contextMemorySize);
1225
1225
context->loadedContextMemorySize = contextMemorySize;
1226
1226
}
Original file line number Diff line number Diff line change @@ -221,7 +221,9 @@ export function resolveChatWrapper({
221
221
return createSpecializedChatWrapper ( LlamaChatWrapper ) ;
222
222
223
223
return createSpecializedChatWrapper ( GeneralChatWrapper ) ;
224
- } else if ( lowercaseName === "yarn" && firstSplitLowercaseSubType === "llama" )
224
+ } else if ( lowercaseName === "codellama" )
225
+ return createSpecializedChatWrapper ( GeneralChatWrapper ) ;
226
+ else if ( lowercaseName === "yarn" && firstSplitLowercaseSubType === "llama" )
225
227
return createSpecializedChatWrapper ( LlamaChatWrapper ) ;
226
228
else if ( lowercaseName === "orca" )
227
229
return createSpecializedChatWrapper ( ChatMLChatWrapper ) ;
@@ -248,7 +250,7 @@ export function resolveChatWrapper({
248
250
const arch = fileInfo . metadata . general ?. architecture ;
249
251
250
252
if ( arch === "llama" )
251
- return createSpecializedChatWrapper ( LlamaChatWrapper ) ;
253
+ return createSpecializedChatWrapper ( GeneralChatWrapper ) ;
252
254
else if ( arch === "falcon" )
253
255
return createSpecializedChatWrapper ( FalconChatWrapper ) ;
254
256
}
Original file line number Diff line number Diff line change @@ -28,6 +28,18 @@ describe("parseModelFileName", () => {
28
28
} ) ;
29
29
} ) ;
30
30
31
+ test ( "codellama-7b.Q5_K_M.gguf" , ( ) => {
32
+ expect ( parseModelFileName ( "codellama-7b.Q5_K_M.gguf" ) )
33
+ . toEqual ( {
34
+ name : "codellama" ,
35
+ subType : "" ,
36
+ quantization : "Q5_K_M" ,
37
+ fileType : "gguf" ,
38
+ parameters : "7B" ,
39
+ otherInfo : [ ]
40
+ } ) ;
41
+ } ) ;
42
+
31
43
test ( "phind-codellama-34b-v2.Q4_K_M.gguf" , ( ) => {
32
44
expect ( parseModelFileName ( "phind-codellama-34b-v2.Q4_K_M.gguf" ) )
33
45
. toEqual ( {
You can’t perform that action at this time.
0 commit comments