Text Generation
Transformers
Safetensors
GGUF
English
multilingual
qwen3
rag
evaluation
information-retrieval
question-answering
retrieval-augmented-generation
context-evaluation
unsloth
fine-tuned
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use constehub/rag-evaluation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use constehub/rag-evaluation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="constehub/rag-evaluation") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("constehub/rag-evaluation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use constehub/rag-evaluation 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 constehub/rag-evaluation:Q8_0 # Run inference directly in the terminal: llama cli -hf constehub/rag-evaluation:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf constehub/rag-evaluation:Q8_0 # Run inference directly in the terminal: llama cli -hf constehub/rag-evaluation:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf constehub/rag-evaluation:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf constehub/rag-evaluation:Q8_0
Use Docker
docker model run hf.co/constehub/rag-evaluation:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use constehub/rag-evaluation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "constehub/rag-evaluation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "constehub/rag-evaluation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/constehub/rag-evaluation:Q8_0
- SGLang
How to use constehub/rag-evaluation with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "constehub/rag-evaluation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "constehub/rag-evaluation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "constehub/rag-evaluation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "constehub/rag-evaluation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use constehub/rag-evaluation with Ollama:
ollama run hf.co/constehub/rag-evaluation:Q8_0
- Unsloth Desktop
- Pi
How to use constehub/rag-evaluation with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf constehub/rag-evaluation:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "constehub/rag-evaluation:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use constehub/rag-evaluation with Docker Model Runner:
docker model run hf.co/constehub/rag-evaluation:Q8_0
- Lemonade
How to use constehub/rag-evaluation with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull constehub/rag-evaluation:Q8_0
Run and chat with the model
lemonade run user.rag-evaluation-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use constehub/rag-evaluation with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf constehub/rag-evaluation:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default constehub/rag-evaluation:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use constehub/rag-evaluation with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf constehub/rag-evaluation:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "constehub/rag-evaluation:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Mendrika Ramialison commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,12 +10,117 @@ license: apache-2.0
|
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
---
|
|
|
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
This qwen3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
| 21 |
|
|
|
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
---
|
| 13 |
+
# RAG Context Evaluator - Qwen3-8B Fine-tuned π
|
| 14 |
|
| 15 |
+
## Model Details π
|
| 16 |
|
| 17 |
+
**License:** apache-2.0
|
| 18 |
+
**Finetuned from model:** unsloth/qwen3-8b-unsloth-bnb-4bit
|
| 19 |
+
**Model type:** Text Generation (Specialized for RAG Evaluation)
|
| 20 |
+
**Quantization:** Q8_0
|
| 21 |
+
|
| 22 |
+
## Model Description π―
|
| 23 |
+
|
| 24 |
+
This model is specifically fine-tuned to evaluate the quality of retrieved contexts in Retrieval-Augmented Generation (RAG) systems. It assesses retrieved passages against user queries using multiple evaluation metrics commonly used in information retrieval and RAG evaluation.
|
| 25 |
+
|
| 26 |
+
## Intended Uses π‘
|
| 27 |
+
|
| 28 |
+
### Primary Use Case π―
|
| 29 |
+
- **RAG System Evaluation**: Automatically assess the quality of retrieved contexts for question-answering systems
|
| 30 |
+
- **Information Retrieval Quality Control**: Evaluate how well retrieved documents match user queries
|
| 31 |
+
- **Academic Research**: Support research in information retrieval and RAG system optimization
|
| 32 |
+
|
| 33 |
+
### Evaluation Metrics π
|
| 34 |
+
The model evaluates retrieved contexts using the following metrics:
|
| 35 |
+
|
| 36 |
+
1. **Completeness** π - How thoroughly the retrieved context addresses the query
|
| 37 |
+
2. **Clarity** β¨ - How clear and understandable the retrieved information is
|
| 38 |
+
3. **Conciseness** πͺ - How efficiently the information is presented without redundancy
|
| 39 |
+
4. **Precision** π― - How accurate and relevant the retrieved information is
|
| 40 |
+
5. **Recall** π - How comprehensive the retrieved information is in covering the query
|
| 41 |
+
6. **MRR (Mean Reciprocal Rank)** π - Ranking quality of relevant results
|
| 42 |
+
7. **NDCG (Normalized Discounted Cumulative Gain)** π - Ranking quality with position consideration
|
| 43 |
+
8. **Relevance** π - Overall relevance of retrieved contexts to the query
|
| 44 |
+
|
| 45 |
+
## Training Data π
|
| 46 |
+
|
| 47 |
+
### Example Training Instance
|
| 48 |
+
```json
|
| 49 |
+
{
|
| 50 |
+
"instruction": "Evaluate the agent's response according to the metrics: completeness, clarity, conciseness, precision, recall, mrr, ndcg, relevance",
|
| 51 |
+
"input": {
|
| 52 |
+
"question": "Question about retrieved context",
|
| 53 |
+
"retrieved_contexts": "[Multiple numbered passages with source citations]"
|
| 54 |
+
},
|
| 55 |
+
"output": [
|
| 56 |
+
{
|
| 57 |
+
"name": "completeness",
|
| 58 |
+
"value": 1,
|
| 59 |
+
"comment": "Detailed evaluation comment"
|
| 60 |
+
}
|
| 61 |
+
// ... other metrics
|
| 62 |
+
]
|
| 63 |
+
}
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Performance and Limitations β‘
|
| 67 |
+
|
| 68 |
+
### Strengths
|
| 69 |
+
- Specialized for RAG evaluation
|
| 70 |
+
- Multi-dimensional assessment capability
|
| 71 |
+
- Detailed explanatory comments for each metric
|
| 72 |
+
|
| 73 |
+
### Limitations
|
| 74 |
+
- **Context Length**: Performance may vary with very long retrieved contexts
|
| 75 |
+
|
| 76 |
+
## Ethical Considerations π€
|
| 77 |
+
|
| 78 |
+
- The model should be used as a tool to assist human evaluators, not replace human judgment entirely
|
| 79 |
+
- Evaluations should be validated by domain experts for critical applications
|
| 80 |
+
|
| 81 |
+
## Technical Specifications π§
|
| 82 |
+
|
| 83 |
+
- **Base Model**: Qwen3-8B
|
| 84 |
+
- **Quantization**: Q8_0
|
| 85 |
+
|
| 86 |
+
## Usage Example π»
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 90 |
+
|
| 91 |
+
model_name = "mendrika261/rag-evaluator-qwen3-8b"
|
| 92 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 93 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 94 |
+
|
| 95 |
+
# Example evaluation prompt
|
| 96 |
+
prompt = """Evaluate the agent's response according to the metrics: completeness, clarity, conciseness, precision, recall, mrr, ndcg, relevance
|
| 97 |
+
|
| 98 |
+
Question: [Your question here]
|
| 99 |
+
Retrieved contexts: [Your retrieved contexts here]"""
|
| 100 |
+
|
| 101 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 102 |
+
outputs = model.generate(**inputs)
|
| 103 |
+
evaluation = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
## Citation π
|
| 107 |
+
|
| 108 |
+
If you use this model in your research, please cite:
|
| 109 |
+
|
| 110 |
+
```bibtex
|
| 111 |
+
@misc{mendrika261-rag-evaluator,
|
| 112 |
+
title={RAG Context Evaluator - Qwen3-8B Fine-tuned},
|
| 113 |
+
author={mendrika261},
|
| 114 |
+
year={2025},
|
| 115 |
+
howpublished={\url{https://huggingface.co/mendrika261/rag-evaluation}}
|
| 116 |
+
}
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
## Contact π§
|
| 120 |
+
|
| 121 |
+
For questions or issues regarding this model, please contact the developer through the Hugging Face model repository.
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
|
| 125 |
This qwen3 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
| 126 |
|