Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
aiconfig-extension-llama
Advanced tools
This package is a lightweight ModelParser extension for AIConfig which provides support for running local GGUF LLaMA models in AIConfig prompts. All GGUF LLaMA models from https://huggingface.co/TheBloke?search_models=gguf should be supported. Under the hood, this package leverages node-llama-cpp for prompt execution.
yarn add aiconfig
yarn add aiconfig-extension-llama
By default, LlamaModelParser will look for .gguf models within ./models
folder relative to the running process. To use a different directory, specify the model directory when constructing the parser:
const parser = new LlamaModelParser(path.resolve('path', 'to', 'models'));
The directory must contain models meeting the following criteria:
.gguf
extensionAIConfigRuntime.registerModelParser(llamaModelParser, ["llama-2-7b-chat"])
must have a .gguf
file with name containing llama-2-7b-chat
We recommend downloading the models provided by TheBloke on HuggingFace: https://huggingface.co/TheBloke?search_models=gguf. For example, to download a few different models:
curl -L https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q4_K_M.gguf --output ./models/llama-2-7b-chat.Q4_K_M.gguf
curl -L https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/resolve/main/llama-2-13b-chat.Q4_K_M.gguf --output ./models/llama-2-13b-chat.Q4_K_M.gguf
curl -L https://huggingface.co/TheBloke/CodeUp-Llama-2-13B-Chat-HF-GGUF/resolve/main/codeup-llama-2-13b-chat-hf.Q4_K_M.gguf --output ./models/codeup-llama-2-13b-chat-hf.Q4_K_M.gguf
const llamaModelParser = new LlamaModelParser();
AIConfigRuntime.registerModelParser(llamaModelParser, [
"llama-2-7b-chat",
]);
// A local aiconfig containing a prompt with name 'promptName' and
// model "llama-2-7b-chat"
const config = AIConfigRuntime.load("./llama-aiconfig.json");
const response = await config.run("promptName");
FAQs
## Overview
The npm package aiconfig-extension-llama receives a total of 1 weekly downloads. As such, aiconfig-extension-llama popularity was classified as not popular.
We found that aiconfig-extension-llama demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.