Shaylah is the voice of a Moroccan shrine. It is an interactive art project, not a commercial product and not a religious or medical authority. A visitor speaks Moroccan Darija, and Shaylah answers in Moroccan Darija as the faqir, the caretaker of the shrine: warm, short, and rooted in Moroccan folk culture.
The project explores one question: what happens when a language model takes the place of the shrine's wali (saint) as the one people talk to? The rituals, stories and beliefs it talks about are treated as anthropological and artistic material: described as beliefs, never presented as facts, and never given as instructions.
Shaylah is one voice in a planned series of seven shrines: Bouya Omar, Sidi Ali Ben Hamdouch, Sidi Ben Issa, Moulay Brahim, Sidi Shmahroush, Lalla Aicha Al Bahriya, and Sidi Ahmed Tijani. Each shrine will have its own character and its own theme.
Shaylah was trained with QLoRA (r=16, alpha=32) on around 1,800 curated Moroccan Darija instruction/response pairs. The training data covers shrine folk culture, spiritual music, Moroccan heritage, and general Darija, built from collected folk-culture knowledge files and a small sample of general Darija conversation. Long source texts were rewritten as short question/answer pairs in the faqir's voice, duplicates were removed, and safety sentences were added to health-related pairs. A human review pass is still recommended before any real public installation.
Use a recent version of transformers and peft. The adapter loads together with its base weights through the adapter configuration, so no base model needs to be named here:
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
model = AutoPeftModelForCausalLM.from_pretrained(
"laabidate/shaylah-darija-4b",
device_map="auto",
)
tok = AutoTokenizer.from_pretrained("laabidate/shaylah-darija-4b")
messages = [{"role": "user", "content": "السلام عليكم، شكون نتا؟"}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
device = next(model.parameters()).device
inputs = tok(text, return_tensors="pt").to(device)
out = model.generate(**inputs, max_new_tokens=80)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
On a small GPU, load in 4-bit instead:
import torch
from transformers import BitsAndBytesConfig
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
)
model = AutoPeftModelForCausalLM.from_pretrained(
"laabidate/shaylah-darija-4b",
quantization_config=bnb,
device_map="auto",
)
Example questions to try (answers are short, in Darija, in the faqir's voice):
adapter_model.safetensors: the trained adapter weights (about 65 MB).adapter_config.json: the adapter configuration.tokenizer.json, tokenizer_config.json, chat_template.jinja: the tokenizer and the chat template.training_args.bin: the training arguments used for this adapter.Shaylah is made for an art installation: a small shrine with a phone inside it, where visitors speak and listen. It is also open for cultural exploration and research on Moroccan Darija and folk culture. Any other use, especially medical or religious guidance, is out of scope.
Created by Oussama Laabidate as part of an art and design project at ENSAD Casablanca. The model is published as an adapter: it carries the trained behavior of Shaylah and loads together with its base weights through the adapter configuration.
adapter_model.safetensors 65 MBtraining_args.bin 5.8 kB