Instructions to use phate334/embeddinggemma-GTAIDE-300m-2605-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use phate334/embeddinggemma-GTAIDE-300m-2605-GGUF with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("phate334/embeddinggemma-GTAIDE-300m-2605-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] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M
Use Docker
docker model run hf.co/phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use phate334/embeddinggemma-GTAIDE-300m-2605-GGUF with Ollama:
ollama run hf.co/phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M
- Unsloth Studio
How to use phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-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 phate334/embeddinggemma-GTAIDE-300m-2605-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for phate334/embeddinggemma-GTAIDE-300m-2605-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use phate334/embeddinggemma-GTAIDE-300m-2605-GGUF with Docker Model Runner:
docker model run hf.co/phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M
- Lemonade
How to use phate334/embeddinggemma-GTAIDE-300m-2605-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull phate334/embeddinggemma-GTAIDE-300m-2605-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.embeddinggemma-GTAIDE-300m-2605-GGUF-Q4_K_M
List all available models
lemonade list
embeddinggemma-GTAIDE-300m-2605 GGUF
這是 TAIDE 的 embeddinggemma-GTAIDE-300m-2605 的 GGUF 轉換與量化版本,可用最新版 llama.cpp 執行。
模型以 Google EmbeddingGemma 300M 為基礎,經正體中文法規資料微調。最大序列長度為 2,048 tokens,輸出為 768 維向量,採 cosine similarity。
檔案
| 檔名 | 格式 | 大小 | 建議用途 |
|---|---|---|---|
embeddinggemma-GTAIDE-300m-2605-BF16.gguf |
BF16 | 600.88 MiB | 基準品質、驗證 |
embeddinggemma-GTAIDE-300m-2605-Q8_0.gguf |
Q8_0 | 325.96 MiB | 推薦;品質與大小平衡 |
embeddinggemma-GTAIDE-300m-2605-Q4_K_M.gguf |
Q4_K_M | 235.74 MiB | 記憶體較受限的環境 |
完整 SHA-256 位於 SHA256SUMS,轉換來源與驗證資料位於 conversion-manifest.json。
llama.cpp 使用方式
啟動 OpenAI 相容 embeddings API:
llama-server \
--model embeddinggemma-GTAIDE-300m-2605-Q8_0.gguf \
--alias embeddinggemma-GTAIDE-300m-2605 \
--embeddings \
--pooling mean \
--ctx-size 2048 \
--host 127.0.0.1 \
--port 8080
送出查詢與文件:
curl http://127.0.0.1:8080/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{
"model": "embeddinggemma-GTAIDE-300m-2605",
"input": [
"task: search result | query: 勞工保險費如何繳納?",
"title: none | text: 投保單位應於次月底前繳納保險費。"
]
}'
檢索時請由呼叫端加入 EmbeddingGemma 的 task prompt:
| 類型 | 格式 |
|---|---|
| Query | task: search result | query: {query} |
| Document | title: none | text: {document} |
原始 TAIDE 模型卡的示例是對 query 使用 model.encode(query)、對文件使用 model.encode_document(docs)。若要精確重現該示例,query 不加前綴,文件仍使用 title: none | text: 前綴。
轉換資訊
- 來源模型 revision:
451ef76c7ef163f8c08903f196b78f85e0b4a027 - llama.cpp commit:
6ba5ef247034cd57201360aed246d98f5a404d92 - 轉換日期:2026-07-28
- 架構:
gemma-embedding - Pooling:mean
- 上下文長度:2,048
- 輸出維度:768
- GGUF 張量數:316
BF16 轉換保留 Sentence Transformers 的 2_Dense 與 3_Dense 投影層:
python convert_hf_to_gguf.py MODEL_DIR \
--outfile embeddinggemma-GTAIDE-300m-2605-BF16.gguf \
--outtype bf16 \
--sentence-transformers-dense-modules \
--model-name embeddinggemma-GTAIDE-300m-2605
量化指令:
llama-quantize embeddinggemma-GTAIDE-300m-2605-BF16.gguf \
embeddinggemma-GTAIDE-300m-2605-Q8_0.gguf Q8_0
llama-quantize embeddinggemma-GTAIDE-300m-2605-BF16.gguf \
embeddinggemma-GTAIDE-300m-2605-Q4_K_M.gguf Q4_K_M
Tokenizer 相容性處理
來源的文字模型 embedding matrix 為 262,144 tokens(ID 0..262143),但 tokenizer 額外宣告了未被文字模型使用的 <image_soft_token>(ID 262144)。最新版 llama.cpp 轉換器會正確拒絕這個超出 embedding matrix 的 ID。
因此只在轉換用副本中移除該 image-only token,以及 tokenizer_config.json 對應的 image token 宣告;原始下載檔未修改。一般中英文測試文字在修正前後的 token IDs 完全相同。
驗證結果
以 sentence-transformers==5.3.0、transformers==5.3.0 的原始 F32 模型作為參考,對六組中英文與檢索 prompt 比較正規化後的 768 維向量:
| GGUF | 與原始模型 cosine 平均值 | 最低值 |
|---|---|---|
| BF16 | 0.999988 | 0.999982 |
| Q8_0 | 0.999688 | 0.999496 |
| Q4_K_M | 0.987143 | 0.982265 |
另已驗證:
- 三個 GGUF 都能由最新版
llama-embedding載入並輸出 768 維向量。 - Q8_0 已通過
llama-server的/v1/embeddings批次 API 測試。 - 原始模型卡示例在相同 Python 套件版本下得到
[0.697366, 0.289298, 0.202309],與模型卡公布的[0.6974, 0.2893, 0.2023]一致。
授權
此轉換不變更原始模型授權。下載、散布或使用前,請閱讀並遵守 TAIDE 原始模型頁面 所列的 Gemma 版次 TAIDE 模型授權條款與相關要求。
- Downloads last month
- 123
4-bit
8-bit
16-bit
Model tree for phate334/embeddinggemma-GTAIDE-300m-2605-GGUF
Base model
google/embeddinggemma-300m