Text Generation
Transformers
Safetensors
Arabic
English
llama
translation
darija
moroccan-arabic
english
arabic
small-language-model
slm
tiny-lm
chatml
scaling-study
text-generation-inference
Instructions to use oddadmix/Emhotob-5M-Darija-English-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use oddadmix/Emhotob-5M-Darija-English-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="oddadmix/Emhotob-5M-Darija-English-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("oddadmix/Emhotob-5M-Darija-English-v2") model = AutoModelForCausalLM.from_pretrained("oddadmix/Emhotob-5M-Darija-English-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use oddadmix/Emhotob-5M-Darija-English-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "oddadmix/Emhotob-5M-Darija-English-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oddadmix/Emhotob-5M-Darija-English-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/oddadmix/Emhotob-5M-Darija-English-v2
- SGLang
How to use oddadmix/Emhotob-5M-Darija-English-v2 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 "oddadmix/Emhotob-5M-Darija-English-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oddadmix/Emhotob-5M-Darija-English-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "oddadmix/Emhotob-5M-Darija-English-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oddadmix/Emhotob-5M-Darija-English-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use oddadmix/Emhotob-5M-Darija-English-v2 with Docker Model Runner:
docker model run hf.co/oddadmix/Emhotob-5M-Darija-English-v2
File size: 12,803 Bytes
b98ebd3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | {
"eval_size": 3000,
"seed": 42,
"generation": {
"do_sample": false,
"repetition_penalty": 1.0,
"no_repeat_ngram_size": 0
},
"directions": {
"dar2en": {
"bleu": 13.446299302555513,
"chrf": 23.93451764854585,
"samples": [
{
"source": "لا، عندنا تذاكر يا حبيبة",
"reference": "No, we have tickets darling",
"hypothesis": "No, I'm sorry to be a bit"
},
{
"source": "غطّا وجهو و بكا",
"reference": "He covered his face and wept",
"hypothesis": "do you want to say"
},
{
"source": "كانتسنّا فيك ت دي هادشي و تستاهلو",
"reference": "I'm waiting for you to deserve this",
"hypothesis": "I'm waiting for you to be a bit"
},
{
"source": "\n\nلجدوال ديال الترتيب\n\nشوف حتى \n\n بوطولا 1\n بوطولا 2\n لهيكلة لهرمية د لبوطولات ديال كورة ف لمغريب\n\nعيون لكلام \n\nبوطولا 1\nمقالات فيها مصدر و 3000 بايت",
"reference": "For the dawn of the arrangement\n\nLook even\n\n Potola 1\n Potola 2\n For the structure of the pyramid D for Diyal Koura's Boutra\n\nEyes of words\n\nPotola 1\nArticles with a source and 3000 bytes",
"hypothesis": "For the dawn of the arrangement\n\nLook even\n\n Potola 1\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Potola 2\n Pot"
},
{
"source": "راهوم معشششين هنا و بان ليا قريب يخرجو لفراخ ديالهوم من لبيض",
"reference": "They're nesting over there and it looks as if the babies will hatch out soon.",
"hypothesis": "he is not someone here and someone"
},
{
"source": "أفادت التقارير أنه يوجد في المنطقة حوالي 9400 منزل بدون ماء وحوالي 100 منزل بلا كهرباء.",
"reference": "It is reported that some 9400 homes in the region are without water and approximately 100 without electricity. The previous text is in English. Here is a translation to Moroccan Arabic:",
"hypothesis": "The same year in the earthquake side of the country, the earthquake side of the country. The previous text is in English. Here is a translation to Moroccan Arabic:"
},
{
"source": "نتحداك تعتارد على هاد الموضوع",
"reference": "I dare you to object to this topic",
"hypothesis": "I dare you to be a lot"
},
{
"source": "walakin hadi awal tsafira ftyyara lia o ana khayfa chwiya",
"reference": "but it's my first flight ever and I'm a little scared",
"hypothesis": "Do you know what you're not sure you're not sure you're not sure"
},
{
"source": "شرف ليا نعاونك",
"reference": "Glad to help",
"hypothesis": "you are too late to yourself"
},
{
"source": "معرفتش من إمتا كايفكرو فهاد شي",
"reference": "i dont know why they think",
"hypothesis": "I don't know what to do"
},
{
"source": "سير دير شي حاجة تنافعك",
"reference": "do something that will benefit you",
"hypothesis": "go to see you"
},
{
"source": "وسبحسام",
"reference": "thirty five past",
"hypothesis": "And they're her"
},
{
"source": "هوا كايدحاك بزاف.",
"reference": "That is so funny.",
"hypothesis": "He is a good idea."
},
{
"source": "ناسّ كاتعجبهوم شيكاغو",
"reference": "people love chicago",
"hypothesis": "It's a lot of them"
},
{
"source": "ش† كاينين أختي وماهات",
"reference": "there are some mothers",
"hypothesis": "i took her"
},
{
"source": "ghadi ykhSona sway3 bach nrj3o mnin jina, f DDlam, o f wsT ga3 had lghiss ...",
"reference": "It will take us hours to get back the way we came, in the dark, and through all that mud ...",
"hypothesis": "It's a good phone, friend, friend, and friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, friend, fri"
},
{
"source": "تقدر تعتامد عليا أ الشاف!",
"reference": "You can count on me, boss!",
"hypothesis": "You're not sure I'm sorry!"
},
{
"source": "خلينا غير نبقاو ف روكك",
"reference": "Let's just stay rock",
"hypothesis": "Let's started in God"
},
{
"source": "ولا غادي يخاساك تخدام دروج",
"reference": "Otherwise you’ll have to use the stairs",
"hypothesis": "I'll take the two day"
},
{
"source": "شحال ديال لواقت ايخاسنا باش نجاهزو تاجريبا؟",
"reference": "How long do we have to prepare the experiment?",
"hypothesis": "What do you think often do you have to do together?"
}
]
},
"en2dar": {
"bleu": 11.79660565975206,
"chrf": 20.86721324211251,
"samples": [
{
"source": "No, we have tickets darling",
"reference": "لا، عندنا تذاكر يا حبيبة",
"hypothesis": "لا، غادي نديرو"
},
{
"source": "He covered his face and wept",
"reference": "غطّا وجهو و بكا",
"hypothesis": "هوا شي حاجة و لكن"
},
{
"source": "I'm waiting for you to deserve this",
"reference": "كانتسنّا فيك ت دي هادشي و تستاهلو",
"hypothesis": "كانتسنّا فيك ت قاسح ليا"
},
{
"source": "For the dawn of the arrangement\n\nLook even\n\n Potola 1\n Potola 2\n For the structure of the pyramid D for Diyal Koura's Boutra\n\nEyes of words\n\nPotola 1\nArticles with a source and 3000 bytes",
"reference": "لجدوال ديال الترتيب\n\nشوف حتى \n\n بوطولا 1\n بوطولا 2\n لهيكلة لهرمية د لبوطولات ديال كورة ف لمغريب\n\nعيون لكلام \n\nبوطولا 1\nمقالات فيها مصدر و 3000 بايت",
"hypothesis": "لجدوال ديال الترتيب\n\nشوف حتى \n\n بوطولا 1\n بوطولا 2\n لهيكلة لهرمية د لبوطولات ديال كورة ف لمغريب\n\nعيون لكلام \n\nبوطولا 1\nمقالات فيها مصدر و 3000 بايت"
},
{
"source": "They're nesting over there and it looks as if the babies will hatch out soon.",
"reference": "راهوم معشششين هنا و بان ليا قريب يخرجو لفراخ ديالهوم من لبيض",
"hypothesis": "كاينين بزاف ديال ليا غادي تاخد شي حاجة باش نديرو شي حاجة."
},
{
"source": "It is reported that some 9400 homes in the region are without water and approximately 100 without electricity. The previous text is in English. Here is a translation to Moroccan Arabic:",
"reference": "أفادت التقارير أنه يوجد في المنطقة حوالي 9400 منزل بدون ماء وحوالي 100 منزل بلا كهرباء.",
"hypothesis": "كاين 9400 واحد، واحد واحد من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100 من 100."
},
{
"source": "I dare you to object to this topic",
"reference": "نتحداك تعتارد على هاد الموضوع",
"hypothesis": "نتحداك ت تڭولّا هادشي لي كاتستاهل"
},
{
"source": "but it's my first flight ever and I'm a little scared",
"reference": "walakin hadi awal tsafira ftyyara lia o ana khayfa chwiya",
"hypothesis": "walakin kayn 3lih 3la lmakhir"
},
{
"source": "Glad to help",
"reference": "شرف ليا نعاونك",
"hypothesis": "l7al l7al"
},
{
"source": "i dont know why they think",
"reference": "معرفتش من إمتا كايفكرو فهاد شي",
"hypothesis": "مانضنش غادي نديرو"
},
{
"source": "do something that will benefit you",
"reference": "سير دير شي حاجة تنافعك",
"hypothesis": "ماتبقاش نديرو هادشي"
},
{
"source": "thirty five past",
"reference": "وسبحسام",
"hypothesis": "هادشي كايعجبك"
},
{
"source": "That is so funny.",
"reference": "هوا كايدحاك بزاف.",
"hypothesis": "هادشي غادي نديرو."
},
{
"source": "people love chicago",
"reference": "ناسّ كاتعجبهوم شيكاغو",
"hypothesis": "راه خدام بزاف"
},
{
"source": "there are some mothers",
"reference": "ش† كاينين أختي وماهات",
"hypothesis": "كاينين بزاف"
},
{
"source": "It will take us hours to get back the way we came, in the dark, and through all that mud ...",
"reference": "ghadi ykhSona sway3 bach nrj3o mnin jina, f DDlam, o f wsT ga3 had lghiss ...",
"hypothesis": "غادي نديرو شي حاجة فهادشي، فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهادشي، و كاين شي حاجة فهاد"
},
{
"source": "You can count on me, boss!",
"reference": "تقدر تعتامد عليا أ الشاف!",
"hypothesis": "مابقيتش باغي نديرو ليا، غادي نديرو"
},
{
"source": "Let's just stay rock",
"reference": "خلينا غير نبقاو ف روكك",
"hypothesis": "خليني نديرو"
},
{
"source": "Otherwise you’ll have to use the stairs",
"reference": "ولا غادي يخاساك تخدام دروج",
"hypothesis": "واخا تاخد شي حاجة"
},
{
"source": "How long do we have to prepare the experiment?",
"reference": "شحال ديال لواقت ايخاسنا باش نجاهزو تاجريبا؟",
"hypothesis": "شحال هادشي لي كانو كاين شي حاجة؟"
}
]
}
}
} |