Instructions to use CHKH01/BGE-m3-ko-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use CHKH01/BGE-m3-ko-GGUF with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("CHKH01/BGE-m3-ko-GGUF") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - llama-cpp-python
How to use CHKH01/BGE-m3-ko-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CHKH01/BGE-m3-ko-GGUF", filename="BGE-m3-ko.Q8_0.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 CHKH01/BGE-m3-ko-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 CHKH01/BGE-m3-ko-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf CHKH01/BGE-m3-ko-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf CHKH01/BGE-m3-ko-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf CHKH01/BGE-m3-ko-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 CHKH01/BGE-m3-ko-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf CHKH01/BGE-m3-ko-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 CHKH01/BGE-m3-ko-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf CHKH01/BGE-m3-ko-GGUF:Q8_0
Use Docker
docker model run hf.co/CHKH01/BGE-m3-ko-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use CHKH01/BGE-m3-ko-GGUF with Ollama:
ollama run hf.co/CHKH01/BGE-m3-ko-GGUF:Q8_0
- Unsloth Studio
How to use CHKH01/BGE-m3-ko-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 CHKH01/BGE-m3-ko-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 CHKH01/BGE-m3-ko-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CHKH01/BGE-m3-ko-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use CHKH01/BGE-m3-ko-GGUF with Docker Model Runner:
docker model run hf.co/CHKH01/BGE-m3-ko-GGUF:Q8_0
- Lemonade
How to use CHKH01/BGE-m3-ko-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CHKH01/BGE-m3-ko-GGUF:Q8_0
Run and chat with the model
lemonade run user.BGE-m3-ko-GGUF-Q8_0
List all available models
lemonade list
BGE-m3-ko GGUF
Korean-optimized multilingual embedding model β GGUF format for llama.cpp
BGE-m3-ko is a Korean-tuned variant of BAAI/bge-m3, fine-tuned on Korean retrieval datasets. This repository provides GGUF quantized versions for use with llama.cpp and compatible runtimes (llama-cpp-python, Ollama, etc.).
Model Details
| Attribute | Value |
|---|---|
| Base model | BAAI/bge-m3 |
| Architecture | XLMRobertaModel (XLM-RoBERTa) |
| Parameters | 567M |
| Hidden size | 1024 |
| Layers | 24 |
| Attention heads | 16 |
| Max tokens | 8192 |
| Pooling | CLS (pooling_mode_cls_token: True) |
| Normalization | L2 normalized output |
| Vocabulary size | 250,002 |
| License | Apache 2.0 |
GGUF Files
| Filename | Type | Size | Description |
|---|---|---|---|
BGE-m3-ko.f16.gguf |
F16 | 1.1 GB | Full-precision, best quality |
BGE-m3-ko.Q8_0.gguf |
Q8_0 (int8) | 606 MB | β Recommended β excellent quality/size tradeoff |
Quantization Impact
Q8_0 (8-bit block quantization) preserves the model's quality near-identically while reducing the model size by ~45%. For embedding tasks, the quality difference between F16 and Q8_0 is negligible for most use cases.
Usage
llama-server (HTTP API) β κΆμ₯
μ°Έκ³ : llama.cpp v3.xλΆν° llama-embedding λ°μ΄λ리λ λ³λλ‘ μ‘΄μ¬νμ§ μμ΅λλ€. μλ² λ© κΈ°λ₯μ llama-serverμ ν΅ν©λμμ΅λλ€.
# μλ² μ€ν (Vulkan/CUDA/CPU λ°±μλ μλ μ ν)
llama-server -m BGE-m3-ko.Q8_0.gguf --embedding --pooling cls --port 8080
# Request embeddings via API
curl -X POST http://localhost:8080/embedding \
-H "Content-Type: application/json" \
-d '{"content": "λνλ―Όκ΅μ μλλ μμΈμ
λλ€"}'
# curl μλ΅ μμ: {"embedding":[0.031159,0.055377,...],"n_tokens":8}
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="./BGE-m3-ko.Q8_0.gguf",
embedding=True,
n_ctx=8192,
pooling_type=2, # 0=None 1=Mean 2=CLS 3=Last
)
emb = llm.create_embedding("λνλ―Όκ΅μ μλλ μμΈμ
λλ€")
print(len(emb["data"][0]["embedding"])) # 1024
Original PyTorch (sentence-transformers)
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("dragonkue/BGE-m3-ko")
embeddings = model.encode(["λνλ―Όκ΅μ μλλ μμΈμ
λλ€"])
print(embeddings.shape) # (1, 1024)
Evaluation (MIRACL Korean Retrieval)
| Metric | Score |
|---|---|
| Cosine Accuracy@1 | 0.6103 |
| Cosine Accuracy@3 | 0.8169 |
| Cosine Accuracy@5 | 0.8732 |
| Cosine Accuracy@10 | 0.9202 |
| Cosine NDCG@10 | 0.6833 |
| Cosine MRR@10 | 0.7262 |
| Cosine MAP@100 | 0.6074 |
Conversion Details
Converted from dragonkue/BGE-m3-ko using llama.cpp's convert_hf_to_gguf.py at b9471.
# Convert to F16
python3 convert_hf_to_gguf.py ./dragonkue/BGE-m3-ko \
--outfile BGE-m3-ko.f16.gguf --outtype f16
# Quantize to Q8_0
llama-quantize BGE-m3-ko.f16.gguf BGE-m3-ko.Q8_0.gguf Q8_0
GGUF Metadata
- Architecture:
bert(GGUF BERT β XLM-RoBERTa mapped to BERT arch) - Tokenizer:
t5type (SentencePiece Unigram) - Pooling: CLS
- Causal attention: False
Intended Use
This model is designed for:
- Korean text embeddings (primarily)
- English + multilingual embeddings (inherited from bge-m3)
- Semantic search / retrieval
- Text clustering and classification
- RAG (Retrieval-Augmented Generation) pipelines
License
Apache 2.0. The original model dragonkue/BGE-m3-ko is also Apache 2.0.
BGE-m3-ko GGUF
νκ΅μ΄ μ΅μ ν λ©ν°λ§κ·μΌ μλ² λ© λͺ¨λΈ β llama.cppμ© GGUF ν¬λ§·
BGE-m3-koλ BAAI/bge-m3λ₯Ό νκ΅μ΄ κ²μ λ°μ΄ν°μ μ νμΈνλν μλ² λ© λͺ¨λΈμ λλ€. λ³Έ μ μ₯μλ llama.cpp λ° νΈν λ°νμ(ollama, llama-cpp-python)μμ μ¬μ© κ°λ₯ν GGUF μμν λ²μ μ μ 곡ν©λλ€.
GGUF νμΌ
| νμΌλͺ | νμ | μ©λ | μ€λͺ |
|---|---|---|---|
BGE-m3-ko.f16.gguf |
F16 | 1.1 GB | μ΅κ³ μ λ°λ |
BGE-m3-ko.Q8_0.gguf |
Q8_0 (int8) | 606 MB | β μΆμ² β μ°μν νμ§/μ©λ κ· ν |
μ¬μ©λ²
llama-server (HTTP API) β κΆμ₯
μ°Έκ³ : llama-embedding λ°μ΄λ리λ λ³λλ‘ μ‘΄μ¬νμ§ μμ΅λλ€. μλ² λ©μ llama-serverμ ν΅ν©λμμ΅λλ€.
# μλ² μ€ν (Vulkan/CUDA/CPU)
llama-server -m BGE-m3-ko.Q8_0.gguf --embedding --pooling cls --port 8080
# μλ² λ© μμ²
curl -X POST http://localhost:8080/embedding \
-H "Content-Type: application/json" \
-d '{"content": "μλ² λ©ν λ¬Έμ₯"}'
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(model_path="BGE-m3-ko.Q8_0.gguf", embedding=True, n_ctx=8192, pooling_type=2)
emb = llm.create_embedding("μλ² λ©ν λ¬Έμ₯")
print(emb["data"][0]["embedding"])
λΌμ΄μ μ€
Apache 2.0
- Downloads last month
- 148
8-bit
16-bit