Skip to content

Commit

Permalink
fix llama mlock
Browse files Browse the repository at this point in the history
  • Loading branch information
guinmoon committed Sep 27, 2023
1 parent 87d188d commit 2ebbdd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
4 changes: 2 additions & 2 deletions LLMFarm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_ASSET_PATHS = "\"LLMFarm/Preview Content\"";
DEVELOPMENT_TEAM = C66ZA422A7;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -541,7 +541,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_ASSET_PATHS = "\"LLMFarm/Preview Content\"";
DEVELOPMENT_TEAM = C66ZA422A7;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
20 changes: 4 additions & 16 deletions ModelTest/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ func main(){
// modelInference = ModelInference.Starcoder
// input_text = "def qsort"
//
ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/q4_1-RWKV-4-Raven-1B5-v12-Eng.bin"
// ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/q4_1-RWKV-4-Raven-1B5-v12-Eng.bin"
// // ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/RWKV-4-MIDI-120M-v1-20230714-ctx4096-FP16.bin"
// // ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/Sources/rwkv.cpp-master-8db73b1/tests/tiny-rwkv-660K-FP16.bin"
modelInference = ModelInference.RWKV
// modelInference = ModelInference.RWKV
// input_text = "song about love"

// ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/orca-mini-3b.ggmlv3.q4_1.bin"
// ai.modelPath = "/Users/guinmoon/Library/Containers/com.guinmoon.LLMFarm/Data/Documents/models/llama-2-7b-chat-q4_K_M.gguf"
// ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/openllama-3b-v2-q8_0.gguf"
ai.modelPath = "/Users/guinmoon/dev/alpaca_llama_etc/openllama-3b-v2-q8_0.gguf"
// ai.modelPath = "/Users/guinmoon/Library/Containers/com.guinmoon.LLMFarm/Data/Documents/models/orca-mini-3b-q4_1.gguf"
// modelInference = ModelInference.LLama_gguf
modelInference = ModelInference.LLama_gguf
//
var params:ModelContextParams = .default
//
Expand All @@ -86,18 +86,6 @@ func main(){



// if (!params.lora_adapter.empty()) {
// int err = llama_model_apply_lora_from_file(model,
// params.lora_adapter.c_str(),
// params.lora_base.empty() ? NULL : params.lora_base.c_str(),
// params.n_threads);
// if (err != 0) {
// fprintf(stderr, "%s: error: failed to apply lora adapter\n", __func__);
// llama_free(lctx);
// llama_free_model(model);
// return std::make_tuple(nullptr, nullptr);
// }
// }


// input_text = "[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible.\n<</SYS>>\nTell about Stavropol in one sentence.[/INST]"
Expand Down
2 changes: 1 addition & 1 deletion llmfarm_core.swift

0 comments on commit 2ebbdd2

Please sign in to comment.