Instructions to use MawaredHR/Mawared_T1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MawaredHR/Mawared_T1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MawaredHR/Mawared_T1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MawaredHR/Mawared_T1") model = AutoModelForCausalLM.from_pretrained("MawaredHR/Mawared_T1") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MawaredHR/Mawared_T1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MawaredHR/Mawared_T1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MawaredHR/Mawared_T1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MawaredHR/Mawared_T1
- SGLang
How to use MawaredHR/Mawared_T1 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 "MawaredHR/Mawared_T1" \ --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": "MawaredHR/Mawared_T1", "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 "MawaredHR/Mawared_T1" \ --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": "MawaredHR/Mawared_T1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use MawaredHR/Mawared_T1 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MawaredHR/Mawared_T1 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MawaredHR/Mawared_T1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MawaredHR/Mawared_T1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="MawaredHR/Mawared_T1", max_seq_length=2048, ) - Docker Model Runner
How to use MawaredHR/Mawared_T1 with Docker Model Runner:
docker model run hf.co/MawaredHR/Mawared_T1
Bilingual Assistant Model Card
Overview
This bilingual language model is designed to support seamless text generation and understanding in both Arabic (ar) and English (en). Fine-tuned from the arcee-ai/Meraj-Mini base model, it offers robust multilingual capabilities optimized for various applications such as conversational agents, content creation, and multilingual text analysis.
Key Highlights
- Multilingual Proficiency: Designed to handle complex linguistic nuances in both Arabic and English, ensuring high-quality outputs in both languages.
- Performance Optimization: Achieved 2x faster training through innovative methods provided by the Unsloth framework and the Hugging Face TRL library.
- Transformer-Based Architecture: Utilizes advanced transformer layers to deliver state-of-the-art performance in text generation and inference.
Development Details
- Developer: Daemontatox
- License: Licensed under the Apache-2.0, ensuring open accessibility and flexibility for various use cases.
- Base Model: The model is a fine-tuned variant of
arcee-ai/Meraj-Mini. - Frameworks Used:
- Unsloth: Enabled faster and more efficient training.
- Hugging Face TRL Library: Provided tools for reinforcement learning fine-tuning, enhancing model responsiveness and accuracy.
Training Process
The fine-tuning process was conducted with a focus on:
- Data Diversity: Leveraged a bilingual corpus to ensure comprehensive language understanding across both supported languages.
- Optimized Hardware Utilization: Implemented Unsloth's accelerated training methods, significantly reducing resource consumption and training time.
- Reinforcement Learning: Used Hugging Face's TRL library to fine-tune the model's decision-making and response generation capabilities, particularly for conversational and contextual understanding.
Applications
This model is suited for a variety of real-world applications, including:
- Conversational Agents: Powering bilingual chatbots and virtual assistants for customer support and personal use.
- Content Generation: Assisting in drafting multilingual articles, social media posts, and creative writing.
- Translation Support: Providing context-aware translations and summaries across Arabic and English.
- Education: Enhancing learning platforms by offering bilingual educational content and interactive learning experiences.
Future Directions
Plans for extending the model's capabilities include:
- Additional Language Support: Exploring fine-tuning for additional languages.
- Domain-Specific Training: Specializing the model for industries such as healthcare, legal, and technical writing.
- Optimization for Edge Devices: Investigating quantization techniques to deploy the model on resource-constrained hardware like mobile devices and IoT platforms.
Open LLM Leaderboard Evaluation Results
Detailed results can be found here! Summarized results can be found here!
| Metric | Value (%) |
|---|---|
| Average | 26.63 |
| IFEval (0-Shot) | 41.99 |
| BBH (3-Shot) | 31.90 |
| MATH Lvl 5 (4-Shot) | 14.58 |
| GPQA (0-shot) | 11.30 |
| MuSR (0-shot) | 18.68 |
| MMLU-PRO (5-shot) | 41.31 |
- Downloads last month
- 14
Model tree for MawaredHR/Mawared_T1
Evaluation results
- averaged accuracy on IFEval (0-Shot)Open LLM Leaderboard41.990
- normalized accuracy on BBH (3-Shot)test set Open LLM Leaderboard31.900
- exact match on MATH Lvl 5 (4-Shot)test set Open LLM Leaderboard14.580
- acc_norm on GPQA (0-shot)Open LLM Leaderboard11.300
- acc_norm on MuSR (0-shot)Open LLM Leaderboard18.680
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard41.310
