You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

bm-mistral-7b-base

Mistral 7B v0.3 adapted to Bambara (Bamanankan). A LoRA run with r=128 over all seven attention and MLP projections, with embed_tokens and lm_head retrained in full — the shape of vocabulary and language adaptation rather than a task fine-tune.

MistralForCausalLM, bfloat16 — 32 layers, hidden size 4096, intermediate size 14336, 32 attention heads with 8 KV heads (GQA), head dim 128, 32,768-token vocabulary, 32,768-token context, RoPE theta 1e6, no sliding window. Tokenizer is LlamaTokenizer with padding_side="left".

Usage

The repo ships merged weights alongside the LoRA adapter; load the merged weights with AutoModelForCausalLM.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "djelia/bm-mistral-7b-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id, torch_dtype=torch.bfloat16, device_map="auto"
)

prompt = "Bamanankan ye kan ye min bɛ fɔ"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(
    **inputs,
    max_new_tokens=128,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Prompt format

This is a base checkpoint for raw Bambara continuation and for further fine-tuning — there is no chat template, so apply_chat_template does not apply. The instruction-tuned sibling djelia/bm-mistral-7b-v1 adds the Bambara Alpaca layout (### ɲɛfɔli: / ### Donnafɛnw: / ### Jaabi:) on top of the same architecture.

generation_config.json carries only the token ids and max_length, so pass your own sampling settings.

Downloads last month
1
Safetensors
Model size
7B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for djelia/bm-mistral-7b-base

Finetuned
(643)
this model