legml-v1.0
Collection
Collection of the 2nd version of open-source llms by legml.ai
•
2 items
•
Updated
L’IA pure qui forme l’IA : un corpus 100 % francophone sélectionné et contrôlé
Curated by legml.ai – Leader in AI Data Curation & Quality Assurance
legmlai/legml-v1.0-instruct
est la déclinaison instruction-tuned de legml-v1.0-base (Qwen-3 · 8 B).
Elle a été affinée sur Open-Hermes-FR, un corpus de 799 875 paires instruction/réponse exclusivement en français, issu de la traduction puis distillation d’OpenHermes original :contentReference[oaicite:0]{index=0}.
Projet conçu et maintenu par Mohamad Alhajar.
🙏 Merci à Nebius pour le sponsoring GPU : 24 × H100 80 Go qui ont permis cet entraînement.
Paramètre | Valeur |
---|---|
Base | legmlai/legml-v1.0-base (Qwen-3 · 8 B) |
Taille modèle | ≈ 16 Go (fp16) / 8 Go (bf16) |
Jeu d’instructions | Open-Hermes-FR – 799 875 paires, 100 % français :contentReference[oaicite:1]{index=1} |
Méthode | SFT multi-tour + DPO léger |
Licence | Apache-2.0 |
prompt
/ accepted_completion
(+ flags qualité) :contentReference[oaicite:2]{index=2} from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
model_id = "legmlai/legml-v1.0-instruct"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto"
)
messages = [
{"role": "system",
"content": "Tu es un assistant francophone rigoureux et bienveillant."},
{"role": "user",
"content": "Explique-moi la relativité restreinte en trois points."}
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(device)
out = model.generate(
**inputs,
temperature=0.4,
top_p=0.9,
max_new_tokens=512,
repetition_penalty=1.05
)
print(tok.decode(out[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Scénario | Température | top-p | max_new_tokens |
---|---|---|---|
Réponse factuelle | 0.3 – 0.5 | 0.9 | 128 – 256 |
Explication détaillée | 0.4 – 0.6 | 0.9 | 512 – 768 |
Création littéraire | 0.7 – 0.9 | 0.95 | ≥ 512 |
@misc{legml2025_instruct,
title = {legml-v1.0-instruct : French Instruction-Tuned LLM},
author = {Mohamad Alhajar},
howpublished = {https://huggingface.co/legmlai/legml-v1.0-instruct},
year = {2025}
}
© 2025 – legml.ai • Apache-2.0