Instructions to use ymcki/DeciLM-7B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ymcki/DeciLM-7B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ymcki/DeciLM-7B-Instruct-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ymcki/DeciLM-7B-Instruct-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ymcki/DeciLM-7B-Instruct-GGUF 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 ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
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 ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
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 ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use ymcki/DeciLM-7B-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ymcki/DeciLM-7B-Instruct-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": "ymcki/DeciLM-7B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
- SGLang
How to use ymcki/DeciLM-7B-Instruct-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 "ymcki/DeciLM-7B-Instruct-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": "ymcki/DeciLM-7B-Instruct-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 "ymcki/DeciLM-7B-Instruct-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": "ymcki/DeciLM-7B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use ymcki/DeciLM-7B-Instruct-GGUF with Ollama:
ollama run hf.co/ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use ymcki/DeciLM-7B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use ymcki/DeciLM-7B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ymcki/DeciLM-7B-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DeciLM-7B-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,120 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Deci/DeciLM-7B-Instruct
|
| 3 |
+
language:
|
| 4 |
+
- multilingual
|
| 5 |
+
library_name: transformers
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- nlp
|
| 10 |
+
- code
|
| 11 |
+
quantized_by: ymcki
|
| 12 |
+
widget:
|
| 13 |
+
- messages:
|
| 14 |
+
- role: user
|
| 15 |
+
content: Can you provide ways to eat combinations of bananas and dragonfruits?
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
Original model: https://huggingface.co/Deci/DeciLM-7B-Instruct
|
| 19 |
+
|
| 20 |
+
## Prompt Template
|
| 21 |
+
|
| 22 |
+
```
|
| 23 |
+
### System:
|
| 24 |
+
{system_prompt}
|
| 25 |
+
### User:
|
| 26 |
+
{user_prompt}
|
| 27 |
+
### Assistant:
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
Modified llama.cpp to support DeciLMCausalModel's variable Grouped Query Attention.
|
| 32 |
+
|
| 33 |
+
## Download a file (not the whole branch) from below:
|
| 34 |
+
|
| 35 |
+
| Filename | Quant type | File Size | Description |
|
| 36 |
+
| -------- | ---------- | --------- | ----------- |
|
| 37 |
+
| [DeciLM-7B-Instruct.f16.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.f16.gguf) | f16 | 14.1GB | Full F16 weights. |
|
| 38 |
+
| [DeciLM-7B-Instruct.Q8_0.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q8_0.gguf) | Q8_0 | 7.49GB | Extremely high quality, *recommended*. |
|
| 39 |
+
| [DeciLM-7B-Instruct.Q4_K_M.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q4_K_M.gguf) | Q4_K_M | 4.24GB | Very good quality, *recommended*. |
|
| 40 |
+
| [DeciLM-7B-Instruct.Q4_0.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q4_0.gguf) | Q4_0 | 4GB | Good quality. |
|
| 41 |
+
| [DeciLM-7B-Instruct.Q4_0_4_4.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q4_0_4_4.gguf) | Q4_0_4_4 | 4GB | Good quality. *recommended for edge devices <8GB RAM* |
|
| 42 |
+
| [DeciLM-7B-Instruct.Q4_0_4_8.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q4_0_4_8.gguf) | Q4_0_4_8 | 4GB | Good quality. *recommended for edge devices <8GB RAM* |
|
| 43 |
+
| [DeciLM-7B-Instruct.Q4_0_8_8.gguf](https://huggingface.co/ymcki/DeciLM-7B-Instruct-GGUF/blob/main/DeciLM-7B-Instruct.Q4_0_8_8.gguf) | Q4_0_8_8 | 4GB | Good quality. *recommended for edge devices <8GB RAM* |
|
| 44 |
+
|
| 45 |
+
## How to check i8mm and sve support for ARM devices
|
| 46 |
+
|
| 47 |
+
ARM i8mm support is necessary to take advantage of Q4_0_4_8 gguf. All ARM architecture >= ARMv8.6-A supports i8mm.
|
| 48 |
+
|
| 49 |
+
ARM sve support is necessary to take advantage of Q4_0_8_8 gguf. sve is an optional feature that starts from ARMv8.2-A but majority of ARM chips doesn't implement it.
|
| 50 |
+
|
| 51 |
+
For ARM devices without both, it is recommended to use Q4_0_4_4.
|
| 52 |
+
|
| 53 |
+
With these support, the inference speed should be faster in the order of Q4_0_8_8 > Q4_0_4_8 > Q4_0_4_4 > Q4_0 without much effect on the quality of response.
|
| 54 |
+
|
| 55 |
+
This is a [list](https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html) of ARM CPUs that support different ARM instructions. Another [list](https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/refs/heads/master/sbc-bench.sh). Apparently, they only cover limited number of ARM CPUs. It is better you check for i8mm and sve support by yourself.
|
| 56 |
+
|
| 57 |
+
For Apple devices,
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
sysctl hw
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
For other ARM devices (ie most Android devices),
|
| 64 |
+
```
|
| 65 |
+
cat /proc/cpuinfo
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
There are also android apps that can display /proc/cpuinfo.
|
| 69 |
+
|
| 70 |
+
I was told that for Intel/AMD CPU inference, support for AVX2/AVX512 can also improve the performance of Q4_0_8_8.
|
| 71 |
+
|
| 72 |
+
On the other hand, Nvidia 3090 inference speed is significantly faster for Q4_0 than the other ggufs. That means for GPU inference, you better off using Q4_0.
|
| 73 |
+
|
| 74 |
+
## Which Q4_0 model to use for ARM devices
|
| 75 |
+
| Brand | Series | Model | i8mm | sve | Quant Type |
|
| 76 |
+
| ----- | ------ | ----- | ---- | --- | -----------|
|
| 77 |
+
| Apple | A | A4 to A14 | No | No | Q4_0_4_4 |
|
| 78 |
+
| Apple | A | A15 to A18 | Yes | No | Q4_0_4_8 |
|
| 79 |
+
| Apple | M | M1 | No | No | Q4_0_4_4 |
|
| 80 |
+
| Apple | M | M2/M3/M4 | Yes | No | Q4_0_4_8 |
|
| 81 |
+
| Google | Tensor | G1,G2 | No | No | Q4_0_4_4 |
|
| 82 |
+
| Google | Tensor | G3,G4 | Yes | Yes | Q4_0_8_8 |
|
| 83 |
+
| Samsung | Exynos | 2200,2400 | Yes | Yes | Q4_0_8_8 |
|
| 84 |
+
| Mediatek | Dimensity | 9000,9000+ | Yes | Yes | Q4_0_8_8 |
|
| 85 |
+
| Mediatek | Dimensity | 9300 | Yes | No | Q4_0_4_8 |
|
| 86 |
+
| Qualcomm | Snapdragon | 7+ Gen 2,8/8+ Gen 1 | Yes | Yes | Q4_0_8_8 |
|
| 87 |
+
| Qualcomm | Snapdragon | 8 Gen 2,8 Gen 3,X Elite | Yes | No | Q4_0_4_8 |
|
| 88 |
+
|
| 89 |
+
## Convert safetensors to f16 gguf
|
| 90 |
+
|
| 91 |
+
Make sure you have llama.cpp git cloned:
|
| 92 |
+
|
| 93 |
+
```
|
| 94 |
+
python3 convert_hf_to_gguf.py DeciLM-7B-Instruct/ --outfile DeciLM-7B-Instruct.f16.gguf --outtype f16
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
## Convert f16 gguf to Q8_0 gguf without imatrix
|
| 98 |
+
Make sure you have llama.cpp compiled:
|
| 99 |
+
```
|
| 100 |
+
./llama-quantize DeciLM-7B-Instruct.f16.gguf DeciLM-7B-Instruct.Q8_0.gguf q8_0
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
## Downloading using huggingface-cli
|
| 104 |
+
|
| 105 |
+
First, make sure you have hugginface-cli installed:
|
| 106 |
+
|
| 107 |
+
```
|
| 108 |
+
pip install -U "huggingface_hub[cli]"
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
Then, you can target the specific file you want:
|
| 112 |
+
|
| 113 |
+
```
|
| 114 |
+
huggingface-cli download ymcki/DeciLM-7B-Instruct-GGUF --include "DeciLM-7B-Instruct.Q8_0.gguf" --local-dir ./
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
## Credits
|
| 118 |
+
|
| 119 |
+
Thank you bartowski for providing a README.md to get me started.
|
| 120 |
+
|