Text Generation
Spanish
DavidFM43 sergiopperez commited on
Commit
5c0aecf
1 Parent(s): 1dee723

Update README.md (#3)

Browse files

- Update README.md (3e62651f07ffefc180a40bcfbc3c35acfccd1c9b)


Co-authored-by: Sergio Perez <sergiopperez@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +51 -1
README.md CHANGED
@@ -4,11 +4,61 @@ datasets:
4
  license: mit
5
  language:
6
  - es
 
7
  ---
8
 
9
  # Named-entity recognition for Spanish Podcasts
10
 
11
- This model is a fine-tuned version for named-entity recognition of the Spanish [bertin-project/bertin-gpt-j-6B](https://huggingface.co/bertin-project/bertin-gpt-j-6B) checkpoint.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ---
14
  datasets:
 
4
  license: mit
5
  language:
6
  - es
7
+ pipeline_tag: text-generation
8
  ---
9
 
10
  # Named-entity recognition for Spanish Podcasts
11
 
12
+ This model is a fine-tuned version for named-entity recognition of the Spanish [bertin-project/bertin-gpt-j-6B](https://huggingface.co/bertin-project/bertin-gpt-j-6B) checkpoint.
13
+
14
+ This model has been developed during the 2023 Hackaton organized by SomosNLP with the GPUs RTX 3090 provided by Q Blocks.
15
+
16
+ ## Motivation of the project
17
+
18
+ Podcasts are an incredible source of information and inspiration. We can listen to them while commuting, practising sport or cooking our favourite recipe. However, it can be difficult to retain specific facts, dates or people mentioned in them. The aim of this project has been to explore how to capture all those facts using named-entity recognition.
19
+
20
+ Instead of using a language model fine-tuned with a specific NER head, we have reframed the problem as text generation from a prompt of the kind:
21
+
22
+ ```
23
+ text: Yo hoy voy a hablar de mujeres en el mundo del arte, porque me ha leído un libro fantástico que se llama Historia del arte sin hombres, de Katie Hesel. entities: (people, Katie Hesel), (books, Historia del arte sin hombres)
24
+ ```
25
+
26
+ By fine-tuning a large generative model with this prompt, we are able to capture the entities mentioned in the podcast. We fine-tuned the [bertin-gpt-j-6B](https://huggingface.co/bertin-project/bertin-gpt-j-6B) following this strategy.
27
+
28
+ Similar projects with podcasts have been conducted by Andrej Karpathy (https://karpathy.ai/lexicap/) and Aleksa Gordic (https://www.hubermantranscripts.com/).
29
+
30
+ ## Dataset creation
31
+
32
+ For full details of the dataset, check [this page](https://huggingface.co/datasets/hackathon-somos-nlp-2023/podcasts-ner-es). A brief summary is:
33
+
34
+ 1) Transcribe the audio from a youtube playlist by employing whisper ([check this notebook to understand how we did it](https://github.com/sergiopperez/hackathon_podcast/blob/main/src/NER/get_transcriptions.ipynb)). For the podcast we chose "Deforme Semanal" and the audios from this [playlist](https://www.youtube.com/playlist?list=PLLbN7SMQhMVZoXhtQ00AyebQE_-ttDrs9).
35
+
36
+ 2) Gather all the transcriptions, unify all of them into a dataset, and divide them into sentences of 512 characters.
37
+
38
+ 3) For each sentence, we label the entities in it by using the `text-davinci-003` API from OpenAI ([check this notebook to understand how we did it](https://github.com/sergiopperez/hackathon_podcast/blob/main/src/NER/create_entities_json.ipynb).
39
+
40
+ ## Fine-tuning
41
+
42
+ Training was performed in a RTX 3090 kindly provided by Q Blocks. It took 2h20m.
43
+
44
+ We employed the Low-Rank Adaptation (LoRA) strategy to substantially reduce the number of trainable parameters for downstream tasks while maintaining model quality.
45
+
46
+ The pre-trained checkpoint employed was [bertin-project/bertin-gpt-j-6B](https://huggingface.co/bertin-project/bertin-gpt-j-6B). We didn't perform an extensive hyperparameter sweep so there's room to improve it.
47
+
48
+ Check [this script](https://github.com/sergiopperez/hackathon_podcast/blob/main/src/NER/peft-gpt-j.ipynb) to understand how we did it.
49
+
50
+
51
+ ## Evaluation
52
+
53
+ Disclaimer: There was no formal evaluation for the training
54
+
55
+ ## Team members
56
+
57
+ [David Mora](https://huggingface.co/DavidFM43)
58
+
59
+ [Sergio Perez](https://huggingface.co/sergiopperez)
60
+
61
+ [Albeto Fernandez](https://huggingface.co/AlbertoFH98)
62
 
63
  ---
64
  datasets: