Downloads · 30 days
12
8% of all-time downloads
CaffeineAddict69/qwen7b-water-rural-practices
qwen7b-water-rural-practices is a text generation model from CaffeineAddict69. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned version of Qwen/Qwen2.5-7B-Instruct for classifying and extracting good and bad practices in rural water monitoring research papers.
Downloads · 30 days
12
8% of all-time downloads
All-time downloads
150
Public
Parameters
7.6B
15.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
Fine-tuned version of Qwen/Qwen2.5-7B-Instruct for classifying and extracting good and bad practices in rural water monitoring research papers.
This model analyzes text chunks from academic papers and identifies whether they describe good or bad practices for rural water monitoring systems, classifying them across 14 predefined categories (7 good + 7 bad).
The model was fine-tuned with LoRA (r=32) on a dataset of 3516 chunks labeled by Qwen 2.5 72B Instruct AWQ.
Good practices: data_acquisition_technology, data_management, operation_maintenance, sustainability, community_participation, local_adaptation, scalability
Bad practices: inappropriate_technology, non_adaptable_infrastructure, cloud_dependency, high_costs, technical_complexity, centralization, rural_inaccessibility
The model returns structured JSON:
{
"contains_practice": true,
"practices": [
{
"type": "good",
"categories": ["data_acquisition_technology", "sustainability"],
"span": "verbatim text from input",
"explanation": "brief justification",
"confidence": 0.92
}
],
"summary": "one-sentence summary"
}
Evaluated on a held-out set of 390 chunks:
| Metric | Value |
|---|---|
| JSON parse success | 99.7% |
| Accuracy (contains_practice) | 91.0% |
| Precision | 90.2% |
| Recall | 82.8% |
| F1 | 0.864 |
| Type agreement (good/bad) | 83.8% |
| Mean categories Jaccard | 0.641 |
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Method | LoRA (r=32, alpha=64) |
| Trainable params | 80.7M (1.05% of total) |
| Train samples | 3516 |
| Epochs | 3 |
| Batch size (effective) | 16 |
| Learning rate | 2e-4 (cosine schedule) |
| Final train loss | 1.0280 |
| Final eval loss | 1.0845 |
| Hardware | NVIDIA A100 SXM4 80GB |
| Training time | ~1 hour |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"CaffeineAddict69/qwen7b-water-rural-practices",
torch_dtype="bfloat16",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("CaffeineAddict69/qwen7b-water-rural-practices")
system_prompt = '''You are an expert annotator for rural water monitoring research. Analyze text chunks from academic papers and identify practices (good or bad) related to rural water monitoring.
Categories of GOOD practices: data_acquisition_technology, data_management, operation_maintenance, sustainability, community_participation, local_adaptation, scalability.
Categories of BAD practices: inappropriate_technology, non_adaptable_infrastructure, cloud_dependency, high_costs, technical_complexity, centralization, rural_inaccessibility.
Return ONLY valid JSON with this schema:
{"contains_practice": true|false, "practices": [...], "summary": "..."}'''
text = "Your chunk text here..."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": f"Analyze this chunk:\n\n---\n{text}\n---"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=1024, do_sample=False)
response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(response)
Apache 2.0. Inherits restrictions and rights from the base Qwen 2.5 model.
This model was developed for academic research on appropriate technologies for rural water monitoring.