Skip to content

Commit

Permalink
chore: llama_n_embd -> llama_model_n_embd
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jan 24, 2025
1 parent 7e56a2b commit 34b377a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/src/main/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ Java_com_rnllama_LlamaContext_loadModelDetails(
llama_model_desc(llama->model, desc, sizeof(desc));
putString(env, result, "desc", desc);
putDouble(env, result, "size", llama_model_size(llama->model));
putDouble(env, result, "nEmbd", llama_n_embd(llama->model));
putDouble(env, result, "nEmbd", llama_model_n_embd(llama->model));
putDouble(env, result, "nParams", llama_model_n_params(llama->model));
putBoolean(env, result, "isChatTemplateSupported", llama->validateModelChatTemplate());
putMap(env, result, "metadata", meta);
Expand Down
4 changes: 2 additions & 2 deletions ios/RNLlamaContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ - (NSDictionary *)modelInfo {
return @{
@"desc": [NSString stringWithUTF8String:desc],
@"size": @(llama_model_size(llama->model)),
@"nEmbd": @(llama_n_embd(llama->model)),
@"nEmbd": @(llama_model_n_embd(llama->model)),
@"nParams": @(llama_model_n_params(llama->model)),
@"isChatTemplateSupported": @(llama->validateModelChatTemplate()),
@"metadata": meta
Expand Down Expand Up @@ -350,7 +350,7 @@ - (NSDictionary *)completion:(NSDictionary *)params
}

if (params[@"logit_bias"] && [params[@"logit_bias"] isKindOfClass:[NSArray class]]) {
const int n_vocab = llama_vocab_n_tokens(vocab);
const int n_vocab = llama_vocab_n_tokens(vocab);
NSArray *logit_bias = params[@"logit_bias"];
for (NSArray *el in logit_bias) {
if ([el isKindOfClass:[NSArray class]] && [el count] == 2) {
Expand Down

0 comments on commit 34b377a

Please sign in to comment.