Instructions to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF", filename="sahabatai-lion-9b-ties-v1.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-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 gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-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 gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with Ollama:
ollama run hf.co/gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
- Unsloth Studio
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-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 gmonsoon/SahabatAI-Lion-9B-TIES-v1-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 gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with Docker Model Runner:
docker model run hf.co/gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
- Lemonade
How to use gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.SahabatAI-Lion-9B-TIES-v1-GGUF-Q4_K_M
List all available models
lemonade list
SahabatAI-Lion-9B-TIES-v1
formerly gemma2-9b-cpt-sahabatai-v1-instruct-BaseTIES (model name too long :D )
Based on some research, when a finetuned model is merged with its base model with TIES method, there is possibility the merged model will achieve better output.
UPDATE!!! as 20 November 2024, this model is third best model (number one for Gemma2-9B based model) on HF's Open LLM Leaderboard (with Merge/MoErges hide model unchecked) for LLM model below 10B parameters.
gmonsoon/SahabatAI-Lion-9B-TIES-v1 is a merge of the following models:
DEMO Spaces: HERE
🧩 Configuration
models:
- model: GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct
parameters:
weight: 1
density: 1
- model: GoToCompany/gemma2-9b-cpt-sahabatai-v1-instruct
parameters:
weight: 1
density: 1
merge_method: ties
base_model: aisingapore/gemma2-9b-cpt-sea-lionv3-instruct
parameters:
density: 1
normalize: true
int8_mask: true
dtype: bfloat16
💻 Usage
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "gmonsoon/SahabatAI-Lion-9B-TIES-v1"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 33.70 |
| IFEval (0-Shot) | 73.78 |
| BBH (3-Shot) | 43.40 |
| MATH Lvl 5 (4-Shot) | 19.34 |
| GPQA (0-shot) | 9.40 |
| MuSR (0-shot) | 19.13 |
| MMLU-PRO (5-shot) | 37.19 |
- Downloads last month
- 109
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF
Collection including gmonsoon/SahabatAI-Lion-9B-TIES-v1-GGUF
Evaluation results
- strict accuracy on IFEval (0-Shot)Open LLM Leaderboard73.780
- normalized accuracy on BBH (3-Shot)Open LLM Leaderboard43.400
- exact match on MATH Lvl 5 (4-Shot)Open LLM Leaderboard19.340
- acc_norm on GPQA (0-shot)Open LLM Leaderboard9.400
- acc_norm on MuSR (0-shot)Open LLM Leaderboard19.130
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard37.190

