tasal9/ZamAI_Pashto_Dataset
Preview • Updated • 9
How to use tasal9/ZamAI-QA-Pashto with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="tasal9/ZamAI-QA-Pashto") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("tasal9/ZamAI-QA-Pashto")
model = AutoModelForCausalLM.from_pretrained("tasal9/ZamAI-QA-Pashto")Question-answering model specialized for Pashto knowledge queries and factual information retrieval.
This model is part of the ZamAI (زمای) project - an advanced Afghan AI assistant designed to understand and communicate in Pashto, English, and other Afghan languages.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load model and tokenizer
model_name = "tasal9/zamai-qa-pashto"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Generate text
prompt = "سلام! زه د افغانستان په اړه پوښتنه لرم:"
inputs = tokenizer.encode(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
inputs,
max_length=200,
temperature=0.8,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model has been trained on conversational Pashto data and shows strong performance in:
This model is designed to respect Afghan and Islamic values, promoting positive and constructive conversations while avoiding harmful or inappropriate content.
@misc{zamai_zamai_qa_pashto_2024,
title={ZamAI ZamAI-QA-Pashto: Advanced Pashto Language Model},
author={ZamAI Team},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/tasal9/zamai-qa-pashto}
}
For questions, suggestions, or collaboration opportunities, please reach out through the ZamAI project.
Built with ❤️ for the Afghan community