CoolFace
Modelpublic

stfotso/deepseek-R1-qween-french-ghomala-bandjoun-1.5B

sourceHugging Facemitupdated 2y agoView on Hugging Face
1likes79downloads
Model Card

Model Card for Model ID

Translates sentences from French to Ghomala, native language of Bandjoun, a cameroonian village.

Example:

from transformers import AutoTokenizer, AutoModelForCausalLM

MAX_TOKENS = 256

tokenizer = AutoTokenizer.from_pretrained("stfotso/deepseek-R1-qween-french-ghomala-bandjoun-1.5B")
model = AutoModelForCausalLM.from_pretrained("stfotso/deepseek-R1-qween-french-ghomala-bandjoun-1.5B")

test_sentence = "bonjour Adam"
print(test_sentence)

system_prompt = """
1. You are a helpful specialist in linguistic, especially african language and you are required to provide the rightfull translation of a french expression into the ghomala language, the native language of bandjoun, a village of Cameroon.
2. Your ghomala translation should use correct phonetic signs.
"""

messages = [
        {"role": "system", "content": system_prompt},
        {"role": "user", "content": "Sentence (in french): vieil homme"},
        {"role": "assistant", "content": "Sentence (in ghomala): bvo"},
        {"role": "user", "content": f"Sentence (in french): {test_sentence}"}
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer.encode(prompt, return_tensors="pt")
outputs = model.generate(inputs, max_length=MAX_TOKENS, tokenizer=tokenizer, do_sample=True, temperature=0.5, top_p=1, top_k=50, stop_strings=["Sentence (in french)"], pad_token_id=tokenizer.eos_token_id)
generated_text = tokenizer.batch_decode(outputs[:, inputs.shape[1]:])[0]
print(f'generated text: {generated_text}')

Model Details

Model Description

<!-- Provide a longer summary of what this model is. -->

  • —Developed by: Steve TUENO
  • —License: Apache 2.0
  • —Finetuned from model: DeepSeek-R1-Distill-Qwen-1.5B