--- license: apache-2.0 language: - fa - en base_model: - heydariAI/persian-embeddings pipeline_tag: feature-extraction --- # Persian-English Text Embedding Model (GGUF) This is a GGUF conversion of the original heydariAI/persian-embeddings from [heydariAI/persian-embeddings](https://huggingface.co/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](https://huggingface.co/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](https://ollama.com/alishendi/persian-embeddings) Here's how to use it: ### Installation and Usage 1. First, install Ollama: ```bash curl -fsSL https://ollama.com/install.sh | sh ``` 2. Pull the model: ```bash ollama pull alishendi/persian-embeddings ``` 3. Generate embeddings vector for a sample text: ```bash 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: ```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](https://huggingface.co/heydariAI/persian-embeddings). Please consider citing the original authors if you use this model in your research.