conversion en LLM

This commit is contained in:
Alex 2026-01-14 18:41:27 +01:00
parent a4296d012e
commit bf7949d8c3
1 changed files with 33 additions and 0 deletions

View File

@ -111,3 +111,36 @@ Il faut ensuite copier ce prompt dans le fichier ModelFile.
Executer le script ```python mergeLora.py``` Executer le script ```python mergeLora.py```
### Conversion en GGUF ### Conversion en GGUF
En étant à la racine du projet (et toujorus dans le venv), cloner le projet llama.cpp
```bash
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
pip install -r requirements.txt
```
Et lancer la commande (/!\ ca prend eviron 10 minutes):
```bash
python convert_hf_to_gguf.py ../Finetunning/qwen2.5-7b-uk-fr-merged --outfile qwen2.5-7b-uk-fr.gguf --outtype q8_0
```
Vérification :
```bash
./main -m qwen2.5-7b-uk-fr.gguf -p "Translate into French: Привіт світ"
```
Pour que ce nouveau modèle soit exploitable par ollama, il faut TODO
## Utilisation du modèle fine-tunné pour la traduction
Créer un Modelfile :
```
FROM ./qwen2.5-7b-uk-fr.gguf
PARAMETER temperature 0.1
PARAMETER top_p 0.95
PARAMETER num_ctx 4096
SYSTEM """
You are a professional Ukrainian to French translator.
Produce faithful, literal translations.
"""
```