Instructions to use legmlai/legml-v1.0-8b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use legmlai/legml-v1.0-8b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="legmlai/legml-v1.0-8b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("legmlai/legml-v1.0-8b-instruct") model = AutoModelForCausalLM.from_pretrained("legmlai/legml-v1.0-8b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use legmlai/legml-v1.0-8b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "legmlai/legml-v1.0-8b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "legmlai/legml-v1.0-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/legmlai/legml-v1.0-8b-instruct
- SGLang
How to use legmlai/legml-v1.0-8b-instruct 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 "legmlai/legml-v1.0-8b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "legmlai/legml-v1.0-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "legmlai/legml-v1.0-8b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "legmlai/legml-v1.0-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use legmlai/legml-v1.0-8b-instruct with Docker Model Runner:
docker model run hf.co/legmlai/legml-v1.0-8b-instruct
legml-v1.0-instruct — L’Excellence Française de l’Instruction-Tuning
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
1 • Présentation
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.
2 • Spécifications
| 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 |
3 • À propos d’Open-Hermes-FR
- Origine : traduction GPT-4o → français, puis génération des réponses et filtrage automatique.
- Taille : ~ 800 k exemples, schéma
prompt/accepted_completion(+ flags qualité) :contentReference[oaicite:2]{index=2} - Licence : ODC-BY 1.0 (libre, obligation d’attribution) :contentReference[oaicite:3]{index=3}
- Objectif : fournir un socle cohérent et riche pour l’alignement des LLMs francophones (dialogue, raisonnement, QA).
4 • Exemple d’utilisation « chat »
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))
5 • Hyper-paramètres conseillés
| 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 |
6 • Limitations connues
- Connaissances post-avril 2025 limitées — vérifiez toujours les faits récents.
- Raisonnement mathématique compétition encore perfectible.
- Biais : certaines traces des datasets sources et de GPT-4o subsistent.
7 • Citation
@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
- Downloads last month
- -
Model tree for legmlai/legml-v1.0-8b-instruct
Datasets used to train legmlai/legml-v1.0-8b-instruct
legmlai/openhermes-fr
Space using legmlai/legml-v1.0-8b-instruct 1
Collection including legmlai/legml-v1.0-8b-instruct
Evaluation results
- accuracy on gpqa-frtest set self-reported14.560
- accuracy on IFEval-frvalidation set self-reported13.550
- accuracy on MMMLU-frtest set self-reported64.570
- accuracy on bbh-frvalidation set self-reported38.710
- accuracy on musr-frvalidation set self-reported4.410
- accuracy on MATH_LVL5_frtest set self-reported34.440