Text Generation
Transformers
Safetensors
Arabic
English
qwen2
text-generation-inference
unsloth
trl
conversational
Eval Results (legacy)
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)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MawaredHR/Mawared_T1") model = AutoModelForCausalLM.from_pretrained("MawaredHR/Mawared_T1", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 Desktop
- Docker Model Runner
How to use MawaredHR/Mawared_T1 with Docker Model Runner:
docker model run hf.co/MawaredHR/Mawared_T1
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,15 +8,56 @@ tags:
|
|
| 8 |
- trl
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
|
|
|
| 11 |
- en
|
| 12 |
---
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
-
|
| 17 |
-
- **License:** apache-2.0
|
| 18 |
-
- **Finetuned from model :** arcee-ai/Meraj-Mini
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- trl
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
+
- ar
|
| 12 |
- en
|
| 13 |
---
|
| 14 |
+

|
| 15 |
+
# Bilingual Assistant Model Card
|
| 16 |
|
| 17 |
+
## Overview
|
| 18 |
|
| 19 |
+
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.
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
### Key Highlights
|
| 22 |
|
| 23 |
+
- **Multilingual Proficiency:** Designed to handle complex linguistic nuances in both Arabic and English, ensuring high-quality outputs in both languages.
|
| 24 |
+
- **Performance Optimization:** Achieved 2x faster training through innovative methods provided by the [Unsloth](https://github.com/unslothai/unsloth) framework and the Hugging Face TRL library.
|
| 25 |
+
- **Transformer-Based Architecture:** Utilizes advanced transformer layers to deliver state-of-the-art performance in text generation and inference.
|
| 26 |
+
|
| 27 |
+
## Development Details
|
| 28 |
+
|
| 29 |
+
- **Developer:** Daemontatox
|
| 30 |
+
- **License:** Licensed under the Apache-2.0, ensuring open accessibility and flexibility for various use cases.
|
| 31 |
+
- **Base Model:** The model is a fine-tuned variant of `arcee-ai/Meraj-Mini`.
|
| 32 |
+
- **Frameworks Used:**
|
| 33 |
+
- [Unsloth](https://github.com/unslothai/unsloth): Enabled faster and more efficient training.
|
| 34 |
+
- Hugging Face TRL Library: Provided tools for reinforcement learning fine-tuning, enhancing model responsiveness and accuracy.
|
| 35 |
+
|
| 36 |
+
## Training Process
|
| 37 |
+
|
| 38 |
+
The fine-tuning process was conducted with a focus on:
|
| 39 |
+
|
| 40 |
+
- **Data Diversity:** Leveraged a bilingual corpus to ensure comprehensive language understanding across both supported languages.
|
| 41 |
+
- **Optimized Hardware Utilization:** Implemented Unsloth's accelerated training methods, significantly reducing resource consumption and training time.
|
| 42 |
+
- **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.
|
| 43 |
+
|
| 44 |
+
## Applications
|
| 45 |
+
|
| 46 |
+
This model is suited for a variety of real-world applications, including:
|
| 47 |
+
|
| 48 |
+
1. **Conversational Agents:** Powering bilingual chatbots and virtual assistants for customer support and personal use.
|
| 49 |
+
2. **Content Generation:** Assisting in drafting multilingual articles, social media posts, and creative writing.
|
| 50 |
+
3. **Translation Support:** Providing context-aware translations and summaries across Arabic and English.
|
| 51 |
+
4. **Education:** Enhancing learning platforms by offering bilingual educational content and interactive learning experiences.
|
| 52 |
+
|
| 53 |
+
## Future Directions
|
| 54 |
+
|
| 55 |
+
Plans for extending the model's capabilities include:
|
| 56 |
+
|
| 57 |
+
- **Additional Language Support:** Exploring fine-tuning for additional languages.
|
| 58 |
+
- **Domain-Specific Training:** Specializing the model for industries such as healthcare, legal, and technical writing.
|
| 59 |
+
- **Optimization for Edge Devices:** Investigating quantization techniques to deploy the model on resource-constrained hardware like mobile devices and IoT platforms.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
For more information and updates, visit the [Unsloth GitHub Repository](https://github.com/unslothai/unsloth).
|