Instructions to use onicai/llama_cpp_canister_models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use onicai/llama_cpp_canister_models with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="onicai/llama_cpp_canister_models", filename="stories110Mtok32000.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use onicai/llama_cpp_canister_models with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf onicai/llama_cpp_canister_models # Run inference directly in the terminal: llama cli -hf onicai/llama_cpp_canister_models
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf onicai/llama_cpp_canister_models # Run inference directly in the terminal: llama cli -hf onicai/llama_cpp_canister_models
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf onicai/llama_cpp_canister_models # Run inference directly in the terminal: ./llama-cli -hf onicai/llama_cpp_canister_models
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf onicai/llama_cpp_canister_models # Run inference directly in the terminal: ./build/bin/llama-cli -hf onicai/llama_cpp_canister_models
Use Docker
docker model run hf.co/onicai/llama_cpp_canister_models
- LM Studio
- Jan
- Ollama
How to use onicai/llama_cpp_canister_models with Ollama:
ollama run hf.co/onicai/llama_cpp_canister_models
- Unsloth Studio
How to use onicai/llama_cpp_canister_models with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for onicai/llama_cpp_canister_models to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for onicai/llama_cpp_canister_models to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for onicai/llama_cpp_canister_models to start chatting
- Atomic Chat new
- Docker Model Runner
How to use onicai/llama_cpp_canister_models with Docker Model Runner:
docker model run hf.co/onicai/llama_cpp_canister_models
- Lemonade
How to use onicai/llama_cpp_canister_models with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull onicai/llama_cpp_canister_models
Run and chat with the model
lemonade run user.llama_cpp_canister_models-{{QUANT_TAG}}List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,16 +12,6 @@ language:
|
|
| 12 |
- Try them out at [ICGPT](https://icgpt.icpp.world/)
|
| 13 |
- The models were created with the training procedure outlined in [karpathy/llama2.c](https://github.com/karpathy/llama2.c) and then converted into *.gguf format as described below.
|
| 14 |
|
| 15 |
-
## TinyStories models
|
| 16 |
-
|
| 17 |
-
| model | notes |
|
| 18 |
-
|-------|-------|
|
| 19 |
-
| stories260Ktok512.guff | Use this for development & debugging |
|
| 20 |
-
| stories15Mtok4096.guff | Fits in canister & works well ! |
|
| 21 |
-
| stories42Mtok4096.guff | As of April 28, hits instruction limit of canister |
|
| 22 |
-
| stories42Mtok32000.guff | As of April 28, hits instruction limit of canister |
|
| 23 |
-
| stories110Mtok32000.guff | As of April 28, hits instruction limit of canister |
|
| 24 |
-
|
| 25 |
|
| 26 |
## Setup local git with lfs
|
| 27 |
|
|
@@ -77,10 +67,7 @@ convert-llama2c-to-ggml --llama2c-model stories110Mtok32000.bin --copy-vocab-fro
|
|
| 77 |
convert-llama2c-to-ggml --llama2c-model stories42Mtok32000.bin --copy-vocab-from-model models/ggml-vocab-llama.gguf --llama2c-output-model stories42Mtok32000.gguf
|
| 78 |
|
| 79 |
# Run it local, like this
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
# Quantization
|
| 83 |
-
# TODO
|
| 84 |
```
|
| 85 |
|
| 86 |
|
|
|
|
| 12 |
- Try them out at [ICGPT](https://icgpt.icpp.world/)
|
| 13 |
- The models were created with the training procedure outlined in [karpathy/llama2.c](https://github.com/karpathy/llama2.c) and then converted into *.gguf format as described below.
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## Setup local git with lfs
|
| 17 |
|
|
|
|
| 67 |
convert-llama2c-to-ggml --llama2c-model stories42Mtok32000.bin --copy-vocab-from-model models/ggml-vocab-llama.gguf --llama2c-output-model stories42Mtok32000.gguf
|
| 68 |
|
| 69 |
# Run it local, like this
|
| 70 |
+
./llama-cli -m stories15Mtok4096.gguf -p "Joe loves writing stories" -n 600 -c 128
|
|
|
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
|