Instructions to use alishendi/persian-embeddings-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use alishendi/persian-embeddings-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="alishendi/persian-embeddings-gguf", filename="persian-embeddings.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 alishendi/persian-embeddings-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf alishendi/persian-embeddings-gguf # Run inference directly in the terminal: llama-cli -hf alishendi/persian-embeddings-gguf
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf alishendi/persian-embeddings-gguf # Run inference directly in the terminal: llama-cli -hf alishendi/persian-embeddings-gguf
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 alishendi/persian-embeddings-gguf # Run inference directly in the terminal: ./llama-cli -hf alishendi/persian-embeddings-gguf
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 alishendi/persian-embeddings-gguf # Run inference directly in the terminal: ./build/bin/llama-cli -hf alishendi/persian-embeddings-gguf
Use Docker
docker model run hf.co/alishendi/persian-embeddings-gguf
- LM Studio
- Jan
- Ollama
How to use alishendi/persian-embeddings-gguf with Ollama:
ollama run hf.co/alishendi/persian-embeddings-gguf
- Unsloth Studio
How to use alishendi/persian-embeddings-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 alishendi/persian-embeddings-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 alishendi/persian-embeddings-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for alishendi/persian-embeddings-gguf to start chatting
- Docker Model Runner
How to use alishendi/persian-embeddings-gguf with Docker Model Runner:
docker model run hf.co/alishendi/persian-embeddings-gguf
- Lemonade
How to use alishendi/persian-embeddings-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull alishendi/persian-embeddings-gguf
Run and chat with the model
lemonade run user.persian-embeddings-gguf-{{QUANT_TAG}}List all available models
lemonade list
Persian-English Text Embedding Model (GGUF)
This is a GGUF conversion of the original heydariAI/persian-embeddings from heydariAI/persian-embeddings.
The GGUF version is optimized for efficient inference with frameworks like llama.cpp and integration with Ollama.
Model Details
- Original Model: heydariAI/persian-embeddings heydariAI/persian-embeddings
- Model Type: Text Embedding
- Languages: Persian (Farsi) and English
- Conversion: Converted to GGUF format for efficient CPU/GPU inference
Intended Uses
As the original repository mentions, this model is designed for:
- Semantic similarity search
- Retrieval-Augmented Generation (RAG) systems
- Text clustering and classification
- Feature extraction for Persian and English texts
Ollama Integration
This model is available on Ollama Hub as alishendi/persian-embeddings.
Ollama Model Page
Here's how to use it:
Installation and Usage
- First, install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
- Pull the model:
ollama pull alishendi/persian-embeddings
- Generate embeddings vector for a sample text:
curl http://localhost:11434/api/embeddings \
-H "Content-Type: application/json" \
-d '{
"model": "alishendi/persian-embeddings",
"prompt": "برای این متن، بردار بازنمایی تولید کن."
}'
Python Example
Here's how to use the model with Ollama in Python:
# pip install ollama
import ollama
import numpy as np
# Generate embedding
response = ollama.embeddings(
model="alishendi/persian-embeddings",
prompt="برای این متن، بردار بازنمایی تولید کن."
)
embedding = np.array(response["embedding"])
print(f"Embedding shape: {embedding.shape}")
print(f"First 10 values: {embedding[:10]}")
Also you can download the model on LM Studio and generate the embeddings via its API
Performance
The GGUF format provides efficient inference on both CPU and GPU hardware. Performance will vary based on your hardware configuration.
Acknowledgements
This model is based on the original work from heydariAI/persian-embeddings. Please consider citing the original authors if you use this model in your research.
- Downloads last month
- 40
We're not able to determine the quantization variants.
Model tree for alishendi/persian-embeddings-gguf
Base model
FacebookAI/xlm-roberta-base