Text Generation
Transformers
Safetensors
Pashto
English
mistral
instruction-tuning
incomplete-checkpoint
multilingual
education
chat
pashto
tutoring
language:ps
language:en
text-generation-inference
conversational
Instructions to use tasal9/ZamAI-Mistral-7B-Pashto with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tasal9/ZamAI-Mistral-7B-Pashto with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tasal9/ZamAI-Mistral-7B-Pashto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tasal9/ZamAI-Mistral-7B-Pashto") model = AutoModelForCausalLM.from_pretrained("tasal9/ZamAI-Mistral-7B-Pashto", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tasal9/ZamAI-Mistral-7B-Pashto with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tasal9/ZamAI-Mistral-7B-Pashto" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tasal9/ZamAI-Mistral-7B-Pashto", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tasal9/ZamAI-Mistral-7B-Pashto
- SGLang
How to use tasal9/ZamAI-Mistral-7B-Pashto 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 "tasal9/ZamAI-Mistral-7B-Pashto" \ --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": "tasal9/ZamAI-Mistral-7B-Pashto", "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 "tasal9/ZamAI-Mistral-7B-Pashto" \ --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": "tasal9/ZamAI-Mistral-7B-Pashto", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tasal9/ZamAI-Mistral-7B-Pashto with Docker Model Runner:
docker model run hf.co/tasal9/ZamAI-Mistral-7B-Pashto
ZamAI Mistral 7B Pashto
Task: text-generation / instruction-following
Languages: ps, en
Base model: mistralai/Mistral-7B-Instruct-v0.1
Overview
This model is part of the ZamAI Pashto language AI collection. It is fine-tuned/adapted for text-generation / instruction-following in Pashto and related languages.
Intended uses & limitations
- Use for research, prototyping, and production assistance in Pashto NLP.
- Evaluate outputs carefully before deploying in high-stakes applications.
- May reflect biases present in the pre-training or fine-tuning data.
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "tasal9/ZamAI-Mistral-7B-Pashto"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
prompt = "سلام دې وي! تاسو څنګه یاست؟"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128, do_sample=True, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training data
Training dataset details will be added here.
Evaluation
| Metric | Value | Description |
|---|---|---|
| perplexity | TBD | Add measured value |
| bleu | TBD | Add measured value |
| rouge | TBD | Add measured value |
Update this table with your measured results and link to the evaluation script/notebook.
Citation
@misc{zamai_pashto,
title = {{ZamAI Mistral 7B Pashto}},
author = {ZamAI / Yaqoob Tasal},
year = {2024},
howpublished = {\url{https://huggingface.co/tasal9/ZamAI-Mistral-7B-Pashto}}
}
License
This model is released under the mit license.
- Downloads last month
- 284
Model tree for tasal9/ZamAI-Mistral-7B-Pashto
Base model
mistralai/Mistral-7B-v0.1 Finetuned
mistralai/Mistral-7B-Instruct-v0.1