RuterNorway commited on
Commit
1101a0c
1 Parent(s): 24c4fde

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +147 -0
README.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - no
5
+ pipeline_tag: text-generation
6
+ inference: false
7
+ tags:
8
+ - pytorch
9
+ - llama
10
+ - llama-2
11
+ - norwegian
12
+ - norsk
13
+ datasets:
14
+ - NbAiLab/norwegian-alpaca
15
+ ---
16
+ # Llama 2 13b Chat Norwegian LoRA adaptor
17
+ **This is the LoRA adaptor for the Llama 2 13b Chat Norwegian model, and requires the original base model to run**
18
+
19
+ Llama-2-13b-chat-norwegian is a variant of [Meta](https://huggingface.co/meta-llama)´s [Llama 2 13b Chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) model, finetuned on a mix of norwegian datasets created in [Ruter AI Lab](https://ruter.no) the summer of 2023.
20
+
21
+ The model is tuned to understand and generate text in Norwegian. It's trained for one epoch on norwegian-alpaca + 15000 samples of machine-translated data from OpenOrca (the dataset to be released). A small subset of custom-made instructional data is also included.
22
+
23
+ We are currently investigating the possibility of releasing a larger, more powerful model and making GGML and GPTQ versions available for this model.
24
+
25
+
26
+ ## Data
27
+ * Norwegian alpaca
28
+ * 15k Norwegian OpenOrcra (to be released)
29
+ * Small subset of custom made instructional data
30
+
31
+ ## Intended Use
32
+ This model is intended for commercial and research use in Norwegian and can be used as an assistant-like chat.
33
+
34
+ ## Prompt Template
35
+ Llama2 Chat uses a new prompt format:
36
+
37
+ ```
38
+ <s>[INST] <<SYS>>
39
+ You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
40
+ If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. Please answer in the same language as the user.
41
+ <</SYS>>
42
+ This is a test question[/INST] This is a answer </s><s>
43
+ ```
44
+ See also the original implementation [here](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L213).
45
+
46
+ We also implemented the alpaca prompt format, which the model supports.:
47
+ ```
48
+ ### Instruction:
49
+ Summarize following text.
50
+ ### Input:
51
+ Text to be summarized
52
+ ### Response:
53
+ ```
54
+
55
+ ## Why this model?
56
+ As a Norwegian company, we understand firsthand the pressing need for powerful language models tailored to specific languages. Our primary focus is on the Norwegian linguistic landscape. In the age of digitization, languages that lack robust, open-source models can risk becoming marginalized. This is why we're introducing this open-source Norwegian model. We believe that by making such resources freely accessible, we can democratize information, foster innovation, and create a more inclusive digital ecosystem. Our aspiration is for this model to serve as a foundational resource for future specialized Norwegian models. Ultimately, our goal is to bolster the Norwegian NLP community and facilitate the smoother integration of Norwegian models into diverse projects.
57
+
58
+ ## Limitations
59
+ * This is an LLM, not a knowledge model. It can not be expected to have more information about Norway than the basemodel.
60
+ * It will generally preform better on tasks that involves summarization, question answering and chat, than on tasks that requires more knowledge about Norway, specific domains, or tasks where the model can answer freely.
61
+ * The data used for training is machine translated, and may contain grammatical errors and other errors.
62
+ * The model is released as is, and would in most cases need prompt tuning to achieve optimal results.
63
+
64
+
65
+ ## License
66
+ Llama 2 is licensed under the LLAMA 2 [Community License](https://ai.meta.com/resources/models-and-libraries/llama-downloads/), Copyright © Meta Platforms, Inc. All Rights Reserved.
67
+ See the original [model card](https://huggingface.co/meta-llama/Llama-2-13b) for more information.
68
+
69
+ From [norwegian-alpaca](https://huggingface.co/NbAiLab/norwegian-alpaca) we also note that "the current version uses OpenAI's gpt-3.5-turbo; hence, this dataset cannot be used to create models that compete in any way against OpenAI."
70
+
71
+
72
+ ## Disclaimer
73
+ * The model is available "as is". Ruter As takes no responsibility for further use.
74
+ * During testing, it seems that the safeguards implemented by Meta, still work as expected in this model. However, we want to point to the Ethical Considerations and Limitations from the origenal model card:
75
+ ```
76
+ Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios.
77
+ For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts.
78
+ Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model.
79
+ Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/
80
+ ```
81
+ ## Credits
82
+ This model was made at Ruters AI Lab - summer of 2023 as part of their AI initiative.
83
+
84
+ The team wants to thank the support we got from the entire Ruter organization, and especially the Data Science team.
85
+
86
+ ___
87
+ # Llama 2 13b Chat Norwegian LoRA-adapter (Norsk)
88
+ **Dette er LoRA-adapteren for Llama 2 13b Chat Norwegian modellen, og krever den orginale basismodellen for å kjøre**
89
+ Llama-2-13b-chat-norwegian er en versjon av [Meta](https://huggingface.co/meta-llama) sin [Llama 2 13b Chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) model, finetuned på en kombinasjon av diverse norske datasett. Modellen ble laget i [Ruter AI Lab](https://ruter.no) 2023.
90
+
91
+ Modellen er finetuned til å forstå og generere tekst på Norsk. Den er trent i én epoch med norwegian-alpaca + et utvalg av 15000 maskinoversatt data fra OpenOrca (datasett venter på utgivelse). Det består og av et lite sett med selvlagde instruksjonsdata
92
+
93
+ Vi undersøker for øyeblikekt muligheten for å gi ut en større og sterkere modell i framtiden, og å lage en GGML og GPTQ versjon tilgjengelig for denne modellen.
94
+
95
+
96
+ ## Data
97
+ * Norwegian alpaca
98
+ * 15k Norwegian OpenOrcra (venter på utgivelse)
99
+ * Lite sett med selvlagde instruksjonsdata
100
+
101
+
102
+ ## Prompt Mal
103
+ Llama2 Chat bruker et nytt prompt format:
104
+ ```
105
+ <s>[INST] <<SYS>>
106
+ You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
107
+ If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. Please answer in the same language as the user.
108
+ <</SYS>>
109
+ This is a test question[/INST] This is a answer </s><s>
110
+ ```
111
+ Se orgianl implementasjon [her](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L213).
112
+
113
+ Vi har også implementert alpaca prompt formatet, som også er støttet av modellen.
114
+ ```
115
+ ### Instruction:
116
+ Summarize following text.
117
+ ### Input:
118
+ Text to be summarized
119
+ ### Response:
120
+ ```
121
+
122
+ ## Hvorfor denne modellen?
123
+ Som et norsk selskap forstår vi selv det presserende behovet for kraftige språkmodeller tilpasset spesifikke språk. Vårt primære fokus er på det norske språkområdet. I den digitale alderen risikerer språk som mangler robuste, åpne kildekodemodeller å bli marginalisert. Dette er grunnen til at vi nå introduserer denne åpne kildekodemodellen for norsk. Vi tror at ved å gjøre disse ressursene tilgjengelige gratis, kan vi demokratisere informasjonen, fremme innovasjon og skape et mer inkluderende digitalt økosystem. Vår ambisjon er at denne modellen skal tjene som en grunnleggende ressurs for fremtidige spesialiserte norske modeller. Vårt mål er å styrke det norske NLP-miljøet og gjøre det enklere å innlemme norske modeller i ulike prosjekter.
124
+
125
+ ## Begrensninger
126
+ * Dette er en LLM, ikke en kunnskapsmodell. Den kan ikke forventes å ha mer informasjon om Norge enn basismodellen.
127
+ * Den vil generelt prestere bedre på oppgaver som innebærer oppsummering, spørsmålsbesvarelse og chat, enn på oppgaver som krever mer kunnskap om Norge, spesifikke domener, eller oppgaver hvor modellen kan svare fritt.
128
+ * Dataene som brukes til trening er maskinoversatt, og kan inneholde grammatiske feil. Vi har kun gjort en rask manuell sjekk av dataene.
129
+ * Modellen er utgitt som den er, og vil i de fleste tilfeller trenge "prompt tuning" for å oppnå ønskede resultater.
130
+
131
+ ## Lisens
132
+ Llama 2 er lisensiert under LLAMA 2 [Community License](https://ai.meta.com/resources/models-and-libraries/llama-downloads/), Copyright © Meta Platforms, Inc. All Rights Reserved.
133
+ Se det orginale [modell kortet](https://huggingface.co/meta-llama/Llama-2-13b) for mer informasjon.
134
+
135
+
136
+ Fra [norwegian-alpaca](https://huggingface.co/NbAiLab/norwegian-alpaca) vil vi gjøre oppmerksomme på at "the current version uses OpenAI's gpt-3.5-turbo; hence, this dataset cannot be used to create models that compete in any way against OpenAI."
137
+
138
+
139
+ ## Ansvarsfraskrivelse
140
+ * Modellen tilgjengeliggjøres «som den er». Ruter As tar ikke noe ansvar for videre bruk.
141
+ * Under testingen virket det som sikkerhetstiltakene implementert av Meta fortsatt fungerer som forventet for denne modellen. Vi gjør derimot oppmerksom på de etiske betraktiningene og begrensningene fra det orignale modellkortet:
142
+ ```
143
+ Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios.
144
+ For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts.
145
+ Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model.
146
+ Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/
147
+ ```