|
|
--- |
|
|
base_model: mistralai/Mistral-7B-Instruct-v0.3 |
|
|
library_name: peft |
|
|
model_name: mistral7b_labels2codes_lora |
|
|
tags: |
|
|
- base_model:adapter:mistralai/Mistral-7B-Instruct-v0.3 |
|
|
- lora |
|
|
- sft |
|
|
- transformers |
|
|
- trl |
|
|
licence: license |
|
|
pipeline_tag: text-generation |
|
|
--- |
|
|
|
|
|
# Model Card for mistral7b_labels2codes_lora |
|
|
|
|
|
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3). |
|
|
It has been trained using [TRL](https://github.com/huggingface/trl). |
|
|
|
|
|
Mistral-7B Instruct — LoRA (ICD-10 labels → codes) |
|
|
|
|
|
This LoRA adapter fine-tunes mistralai/Mistral-7B-Instruct-v0.3 to map French ICD-10 diagnostic labels (synonyms) to their corresponding codes (dot-less, up to 5 chars). |
|
|
|
|
|
|
|
|
## Quick start |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
|
|
|
question = "Libellé: Antécédent bronchite chronique" |
|
|
generator = pipeline("text-generation", model="None", device="cuda") |
|
|
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] |
|
|
print(output["generated_text"]) |
|
|
``` |
|
|
|
|
|
## Training procedure |
|
|
|
|
|
It was trained via supervised fine-tuning (QLoRA) on an instruction dataset built from (label, code) pairs (instruct_labels2codes) derived from a curated ICD-10 synonyms table created from the webscrapinng of aideaucodage.fr . |
|
|
|
|
|
### Framework versions |
|
|
|
|
|
- PEFT 0.17.0 |
|
|
- TRL: 0.21.0 |
|
|
- Transformers: 4.55.2 |
|
|
- Pytorch: 2.7.1 |
|
|
- Datasets: 3.6.0 |
|
|
- Tokenizers: 0.21.2 |
|
|
|
|
|
## Citations |
|
|
|
|
|
|
|
|
|
|
|
Cite TRL as: |
|
|
|
|
|
```bibtex |
|
|
@misc{vonwerra2022trl, |
|
|
title = {{TRL: Transformer Reinforcement Learning}}, |
|
|
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, |
|
|
year = 2020, |
|
|
journal = {GitHub repository}, |
|
|
publisher = {GitHub}, |
|
|
howpublished = {\url{https://github.com/huggingface/trl}} |
|
|
} |
|
|
``` |