Text Generation
Transformers
GGUF
English
Korean
llama-cpp
gguf-my-repo
Eval Results (legacy)
conversational
Instructions to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF", dtype="auto") - llama-cpp-python
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF", filename="kanana-nano-2.1b-base-q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
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 nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
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 nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
Use Docker
docker model run hf.co/nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
- SGLang
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with Ollama:
ollama run hf.co/nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
- Unsloth Studio
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF 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 nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF 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 nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with Docker Model Runner:
docker model run hf.co/nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
- Lemonade
How to use nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF:Q8_0
Run and chat with the model
lemonade run user.kanana-nano-2.1b-base-Q8_0-GGUF-Q8_0
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ko
|
| 5 |
+
library_name: transformers
|
| 6 |
+
license: cc-by-nc-4.0
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
model_id: kakaocorp/kanana-nano-2.1b-base
|
| 9 |
+
repo: kakaocorp/kanana-nano-2.1b-base
|
| 10 |
+
developers: Kanana LLM
|
| 11 |
+
training_regime: bf16 mixed precision
|
| 12 |
+
tags:
|
| 13 |
+
- llama-cpp
|
| 14 |
+
- gguf-my-repo
|
| 15 |
+
base_model: kakaocorp/kanana-nano-2.1b-base
|
| 16 |
+
model-index:
|
| 17 |
+
- name: kanana-nano-2.1b-base
|
| 18 |
+
results:
|
| 19 |
+
- task:
|
| 20 |
+
type: multiple_choice
|
| 21 |
+
name: mmlu
|
| 22 |
+
dataset:
|
| 23 |
+
name: mmlu (5-shots)
|
| 24 |
+
type: hails/mmlu_no_train
|
| 25 |
+
metrics:
|
| 26 |
+
- type: acc
|
| 27 |
+
value: 54.83
|
| 28 |
+
name: acc
|
| 29 |
+
- task:
|
| 30 |
+
type: generate_until
|
| 31 |
+
name: kmmlu
|
| 32 |
+
dataset:
|
| 33 |
+
name: kmmlu-direct (5-shots)
|
| 34 |
+
type: HAERAE-HUB/KMMLU
|
| 35 |
+
metrics:
|
| 36 |
+
- type: exact_match
|
| 37 |
+
value: 44.83
|
| 38 |
+
name: exact_match
|
| 39 |
+
- task:
|
| 40 |
+
type: multiple_choice
|
| 41 |
+
name: haerae
|
| 42 |
+
dataset:
|
| 43 |
+
name: haerae (5-shots)
|
| 44 |
+
type: HAERAE-HUB/HAE_RAE_BENCH
|
| 45 |
+
metrics:
|
| 46 |
+
- type: acc_norm
|
| 47 |
+
value: 77.09
|
| 48 |
+
name: acc_norm
|
| 49 |
+
- task:
|
| 50 |
+
type: generate_until
|
| 51 |
+
name: gsm8k
|
| 52 |
+
dataset:
|
| 53 |
+
name: gsm8k (5-shots)
|
| 54 |
+
type: openai/gsm8k
|
| 55 |
+
metrics:
|
| 56 |
+
- type: exact_match
|
| 57 |
+
value: 46.32
|
| 58 |
+
name: exact_match_strict
|
| 59 |
+
- task:
|
| 60 |
+
type: generate_until
|
| 61 |
+
name: humaneval
|
| 62 |
+
dataset:
|
| 63 |
+
name: humaneval (0-shots)
|
| 64 |
+
type: openai/openai_humaneval
|
| 65 |
+
metrics:
|
| 66 |
+
- type: pass@1
|
| 67 |
+
value: 31.1
|
| 68 |
+
name: pass@1
|
| 69 |
+
- task:
|
| 70 |
+
type: generate_until
|
| 71 |
+
name: mbpp
|
| 72 |
+
dataset:
|
| 73 |
+
name: mbpp (3-shots)
|
| 74 |
+
type: google-research-datasets/mbpp
|
| 75 |
+
metrics:
|
| 76 |
+
- type: pass@1
|
| 77 |
+
value: 46.2
|
| 78 |
+
name: pass@1
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
# nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF
|
| 82 |
+
This model was converted to GGUF format from [`kakaocorp/kanana-nano-2.1b-base`](https://huggingface.co/kakaocorp/kanana-nano-2.1b-base) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 83 |
+
Refer to the [original model card](https://huggingface.co/kakaocorp/kanana-nano-2.1b-base) for more details on the model.
|
| 84 |
+
|
| 85 |
+
## Use with llama.cpp
|
| 86 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
| 87 |
+
|
| 88 |
+
```bash
|
| 89 |
+
brew install llama.cpp
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
Invoke the llama.cpp server or the CLI.
|
| 93 |
+
|
| 94 |
+
### CLI:
|
| 95 |
+
```bash
|
| 96 |
+
llama-cli --hf-repo nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF --hf-file kanana-nano-2.1b-base-q8_0.gguf -p "The meaning to life and the universe is"
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
### Server:
|
| 100 |
+
```bash
|
| 101 |
+
llama-server --hf-repo nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF --hf-file kanana-nano-2.1b-base-q8_0.gguf -c 2048
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
|
| 105 |
+
|
| 106 |
+
Step 1: Clone llama.cpp from GitHub.
|
| 107 |
+
```
|
| 108 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
|
| 112 |
+
```
|
| 113 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
Step 3: Run inference through the main binary.
|
| 117 |
+
```
|
| 118 |
+
./llama-cli --hf-repo nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF --hf-file kanana-nano-2.1b-base-q8_0.gguf -p "The meaning to life and the universe is"
|
| 119 |
+
```
|
| 120 |
+
or
|
| 121 |
+
```
|
| 122 |
+
./llama-server --hf-repo nonemonehpark/kanana-nano-2.1b-base-Q8_0-GGUF --hf-file kanana-nano-2.1b-base-q8_0.gguf -c 2048
|
| 123 |
+
```
|