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: t5 type (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
GGUF
Model size
0.6B params
Architecture
bert
Hardware compatibility
Log In to add your hardware

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for CHKH01/BGE-m3-ko-GGUF

Base model

BAAI/bge-m3
Quantized
(2)
this model