yqnis commited on
Commit
304f913
·
verified ·
1 Parent(s): 7cc742f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -8
README.md CHANGED
@@ -1,22 +1,83 @@
1
  ---
2
- base_model: unsloth/meta-llama-3.1-8b-instruct-unsloth-bnb-4bit
3
  tags:
4
  - text-generation-inference
5
  - transformers
6
  - unsloth
7
  - llama
8
  - trl
 
9
  license: apache-2.0
10
  language:
11
- - en
12
  ---
13
 
14
- # Uploaded model
15
 
16
- - **Developed by:** yqnis
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/meta-llama-3.1-8b-instruct-unsloth-bnb-4bit
19
 
20
- This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: unsloth/Meta-Llama-3.1-8B-Instruct
3
  tags:
4
  - text-generation-inference
5
  - transformers
6
  - unsloth
7
  - llama
8
  - trl
9
+ - qlora
10
  license: apache-2.0
11
  language:
12
+ - fr
13
  ---
14
 
15
+ # LLaMA 3 8B fine-tuned on Quaero for Named Entity Recognition (Generative)
16
 
17
+ This is a **LoRA adapter** version of [unsloth/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct), fine-tuned on the [Quaero French medical dataset](https://quaerofrenchmed.limsi.fr/) using a **generative approach to Named Entity Recognition (NER)**.
 
 
18
 
19
+ ## Task
20
+
21
+ The model was trained to extract entities from French biomedical sentences (medlines) using a structured, prompt-based format.
22
+
23
+ | Tag | Description |
24
+ | ------ | ----------------------------------------------------------- |
25
+ | `DISO` | **Diseases** or health-related conditions |
26
+ | `ANAT` | **Anatomical parts** (organs, tissues, body regions, etc.) |
27
+ | `PROC` | **Medical or surgical procedures** |
28
+ | `DEVI` | **Medical devices or instruments** |
29
+ | `CHEM` | **Chemical substances or medications** |
30
+ | `LIVB` | **Living beings** (e.g. humans, animals, bacteria, viruses) |
31
+ | `GEOG` | **Geographical locations** (e.g. countries, regions) |
32
+ | `OBJC` | **Physical objects** not covered by other categories |
33
+ | `PHEN` | **Biological processes** (e.g. inflammation, mutation) |
34
+ | `PHYS` | **Physiological functions** (e.g. respiration, vision) |
35
+
36
+ I used `<>` as a separator and the output format is :
37
+
38
+ ```
39
+ TAG_1 entity_1 <> TAG_2 entity_2 <> ... <> TAG_n entity_n'
40
+ ```
41
+
42
+ ## Dataset
43
+
44
+ The original dataset is Quaero French Medical Corpus and I converted it to a JSON format for generative instruction-style training.
45
+
46
+
47
+ ```json
48
+ {
49
+ "input": "Etude de l'efficacité et de la tolérance de la prazosine à libération prolongée chez des patients hypertendus et diabétiques non insulinodépendants.",
50
+ "output": "DISO tolérance <> CHEM prazosine <> LIVB patients <> DISO hypertendus <> DISO diabétiques non insulinodépendants"
51
+ }
52
+ ```
53
+
54
+ The QUAERO French Medical corpus features **overlapping entity spans**, including nested structures, for instance :
55
+ ```json
56
+ {
57
+ "input": "Cancer du pancréas",
58
+ "output": "DISO Cancer <> DISO Cancer du pancréas <> ANAT pancréas"
59
+ }
60
+ ```
61
 
62
+ ## Evaluation
63
+
64
+ Evaluation was performed on the test split by comparing the predicted entity set against the ground truth annotations using exact (type, entity) matching.
65
+
66
+ | Metric | Score |
67
+ | --------- | ------ |
68
+ | Precision | 0.6827 |
69
+ | Recall | 0.7121 |
70
+ | F1 Score | 0.6971 |
71
+
72
+ ## Other formats
73
+
74
+ This model is also available in the following formats:
75
+
76
+ - **16-bit**
77
+ → [yqnis/llama3-8b-quaero](https://huggingface.co/yqnis/llama3-8b-quaero)
78
+
79
+ - **GGUF Q8_0**
80
+ → [yqnis/llama3-8b-quaero-gguf](https://huggingface.co/yqnis/llama3-8b-quaero-gguf)
81
+
82
+
83
+ This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.