Text Generation
Transformers
Safetensors
Arabic
mistral
geography
history
conversational
text-generation-inference
Instructions to use abulbudz/mistral-palestinian-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abulbudz/mistral-palestinian-assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abulbudz/mistral-palestinian-assistant") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abulbudz/mistral-palestinian-assistant") model = AutoModelForCausalLM.from_pretrained("abulbudz/mistral-palestinian-assistant") 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
- vLLM
How to use abulbudz/mistral-palestinian-assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abulbudz/mistral-palestinian-assistant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abulbudz/mistral-palestinian-assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abulbudz/mistral-palestinian-assistant
- SGLang
How to use abulbudz/mistral-palestinian-assistant 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 "abulbudz/mistral-palestinian-assistant" \ --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": "abulbudz/mistral-palestinian-assistant", "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 "abulbudz/mistral-palestinian-assistant" \ --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": "abulbudz/mistral-palestinian-assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abulbudz/mistral-palestinian-assistant with Docker Model Runner:
docker model run hf.co/abulbudz/mistral-palestinian-assistant
Model Description
This model is a fine-tuned variant of mistralai/Mistral-7B-Instruct-v0.3, trained on PalGeo a specialized dataset that focuses on Palestine’s geography.
- Developed by: Ahmad Budairi, Belal Hamdeh, Mitri Khoury
- Language(s) (NLP): Arabic
- Finetuned from model: mistralai/Mistral-7B-Instruct-v0.3
Contact
If you have any feedback, questions, comments, or constructive criticism about this model. please feel free to reach out via the community tab or by email:
- ✉️ Email: ahmadbudairi333@gmail.com
Training Hyperparameters
| Parameter | Value |
|---|---|
| Lora_r | 32 |
| Lora_dropout | 0.1 |
| Bnb_4bit_quant_type | “nf4” |
| num_train_epoch | 3 |
| per_device_train_batch_size | 4 |
| per_device_eval_batch_size | 4 |
| gradient_checkpointing | True |
| learning_rate | 4e-4 |
| optim | “paged_adamw_8bit” |
| lora_alpha | 64 |
| bnb_4bit_compute_dtype | “bfloat16” |
| bf16 | True |
| gradient_accumulation_steps | 64 |
| weight_decay | 0.001 |
Technical Specifications
Hardware
A single NVIDIA GeForce RTX 4070
- Downloads last month
- 2