Instructions to use mostafaamiri/persian-llama-7b-GGUF-Q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mostafaamiri/persian-llama-7b-GGUF-Q4 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 mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M # Run inference directly in the terminal: llama cli -hf mostafaamiri/persian-llama-7b-GGUF-Q4: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 mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mostafaamiri/persian-llama-7b-GGUF-Q4: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 mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
Use Docker
docker model run hf.co/mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mostafaamiri/persian-llama-7b-GGUF-Q4 with Ollama:
ollama run hf.co/mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use mostafaamiri/persian-llama-7b-GGUF-Q4 with Docker Model Runner:
docker model run hf.co/mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
- Lemonade
How to use mostafaamiri/persian-llama-7b-GGUF-Q4 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M
Run and chat with the model
lemonade run user.persian-llama-7b-GGUF-Q4-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Model Card for Model ID
How to run in llama.cpp
./main -t 10 -ngl 32 -m persian_llama_7b.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction: یک شعر حماسی در مورد کوه دماوند بگو ### Input: ### Response:"
Change -t 10 to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use -t 8.
Change -ngl 32 to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
Tto have a chat-style conversation, replace the -p <PROMPT> argument with -i -ins
How to run in text-generation-webui
Further instructions here: text-generation-webui/docs/llama.cpp-models.md.
How to run using LangChain
Instalation on CPU
pip install llama-cpp-python
Instalation on GPU
CMAKE_ARGS="-DLLAMA_CUBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python
from langchain.llms import LlamaCpp
from langchain import PromptTemplate, LLMChain
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
n_gpu_layers = 40 # Change this value based on your model and your GPU VRAM pool.
n_batch = 512 # Should be between 1 and n_ctx, consider the amount of VRAM in your GPU.
n_ctx=2048
callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
# Make sure the model path is correct for your system!
llm = LlamaCpp(
model_path="./persian_llama_7b.Q4_K_M.gguf",
n_gpu_layers=n_gpu_layers, n_batch=n_batch,
callback_manager=callback_manager,
verbose=True,
n_ctx=n_ctx
)
llm("""### Instruction:
یک شعر حماسی در مورد کوه دماوند بگو
### Input:
### Response:""")
For more information refer LangChain
- Downloads last month
- 81
Hardware compatibility
Log In to add your hardware
4-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
docker model run hf.co/mostafaamiri/persian-llama-7b-GGUF-Q4:Q4_K_M