Instructions to use RichardErkhov/DeepMount00_-_Mistral-RAG-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use RichardErkhov/DeepMount00_-_Mistral-RAG-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RichardErkhov/DeepMount00_-_Mistral-RAG-gguf", filename="Mistral-RAG.IQ3_M.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 RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/DeepMount00_-_Mistral-RAG-gguf with Ollama:
ollama run hf.co/RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M
- Unsloth Studio
How to use RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-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 RichardErkhov/DeepMount00_-_Mistral-RAG-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RichardErkhov/DeepMount00_-_Mistral-RAG-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use RichardErkhov/DeepMount00_-_Mistral-RAG-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/DeepMount00_-_Mistral-RAG-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/DeepMount00_-_Mistral-RAG-gguf:Q4_K_M
Run and chat with the model
lemonade run user.DeepMount00_-_Mistral-RAG-gguf-Q4_K_M
List all available models
lemonade list
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Quantization made by Richard Erkhov.
Mistral-RAG - GGUF
- Model creator: https://huggingface.co/DeepMount00/
- Original model: https://huggingface.co/DeepMount00/Mistral-RAG/
| Name | Quant method | Size |
|---|---|---|
| Mistral-RAG.Q2_K.gguf | Q2_K | 2.53GB |
| Mistral-RAG.IQ3_XS.gguf | IQ3_XS | 2.81GB |
| Mistral-RAG.IQ3_S.gguf | IQ3_S | 2.96GB |
| Mistral-RAG.Q3_K_S.gguf | Q3_K_S | 2.95GB |
| Mistral-RAG.IQ3_M.gguf | IQ3_M | 3.06GB |
| Mistral-RAG.Q3_K.gguf | Q3_K | 3.28GB |
| Mistral-RAG.Q3_K_M.gguf | Q3_K_M | 3.28GB |
| Mistral-RAG.Q3_K_L.gguf | Q3_K_L | 3.56GB |
| Mistral-RAG.IQ4_XS.gguf | IQ4_XS | 3.67GB |
| Mistral-RAG.Q4_0.gguf | Q4_0 | 3.83GB |
| Mistral-RAG.IQ4_NL.gguf | IQ4_NL | 3.87GB |
| Mistral-RAG.Q4_K_S.gguf | Q4_K_S | 3.86GB |
| Mistral-RAG.Q4_K.gguf | Q4_K | 4.07GB |
| Mistral-RAG.Q4_K_M.gguf | Q4_K_M | 4.07GB |
| Mistral-RAG.Q4_1.gguf | Q4_1 | 4.24GB |
| Mistral-RAG.Q5_0.gguf | Q5_0 | 4.65GB |
| Mistral-RAG.Q5_K_S.gguf | Q5_K_S | 4.65GB |
| Mistral-RAG.Q5_K.gguf | Q5_K | 4.78GB |
| Mistral-RAG.Q5_K_M.gguf | Q5_K_M | 4.78GB |
| Mistral-RAG.Q5_1.gguf | Q5_1 | 5.07GB |
| Mistral-RAG.Q6_K.gguf | Q6_K | 5.53GB |
| Mistral-RAG.Q8_0.gguf | Q8_0 | 7.17GB |
Original model description:
library_name: transformers license: apache-2.0 datasets: - DeepMount00/gquad_it language: - it
Mistral-RAG
- Model Name: Mistral-RAG
- Base Model: Mistral-Ita-7b
- Specialization: Question and Answer Tasks
Overview
Mistral-RAG is a refined fine-tuning of the Mistral-Ita-7b model, engineered specifically to enhance question and answer tasks. It features a unique dual-response capability, offering both generative and extractive modes to cater to a wide range of informational needs.
Capabilities
Generative Mode
- Description: The generative mode is designed for scenarios that require complex, synthesized responses. This mode integrates information from multiple sources and provides expanded explanations.
- Ideal Use Cases:
- Educational purposes
- Advisory services
- Creative scenarios where depth and detailed understanding are crucial
Extractive Mode
- Description: The extractive mode focuses on speed and precision. It delivers direct and concise answers by extracting specific data from texts.
- Ideal Use Cases:
- Factual queries in research
- Legal contexts
- Professional environments where accuracy and direct evidence are necessary
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
MODEL_NAME = "DeepMount00/Mistral-RAG"
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, torch_dtype=torch.bfloat16).eval()
model.to(device)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
def generate_answer(prompt, response_type="generativo"):
# Creazione del contesto e della domanda in base al tipo di risposta
if response_type == "estrattivo":
prompt = f"Rispondi alla seguente domanda in modo estrattivo, basandoti esclusivamente sul contesto.\n{prompt}"
else:
prompt = f"Rispondi alla seguente domanda in modo generativo, basandoti esclusivamente sul contesto.\n{prompt}"
# Preparazione del messaggio per il modello
messages = [
{"role": "user", "content": prompt},
]
model_inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(device)
generated_ids = model.generate(model_inputs, max_new_tokens=200, do_sample=True,
temperature=0.001, eos_token_id=tokenizer.eos_token_id)
decoded = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
return decoded[0].split("[/INST]", 1)[1].strip() if "[/INST]" in decoded[0] else "Errore nella generazione della risposta"
# Esempio di utilizzo con la nuova funzionalità
contesto = """Venerdì più di 2.100 persone che vivono vicino a un vulcano in Indonesia sono state sfollate per i rischi legati a un’eruzione. Martedì infatti l’isola vulcanica di Ruang, che si trova circa 100 chilometri a nord di Sulawesi, ha cominciato a eruttare, producendo una colonna di fumo e ceneri che ieri ha raggiunto 1.200 metri di altezza. Le operazioni di evacuazione sono ancora in corso: complessivamente sono più di 11mila le persone a cui è stato detto di lasciare le proprie case. Gran parte di loro vive sulla vicina isola di Tagulandang, che in totale ha 20mila abitanti; potrebbe essere raggiunta non solo dalle ceneri vulcaniche e dai piroclasti, ma anche da un eventuale tsunami causato dalla caduta in mare di lava e rocce."""
domanda = "Perchè le persone sono evacuate dalle case?"
prompt = f"Contesto: {contesto}\nDomanda: {domanda}"
answer = generate_answer(prompt, "estrattivo")
print(answer)
Developer
[Michele Montebovi]
- Downloads last month
- 81
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit