IrbisAI commited on
Commit
af732dd
·
verified ·
1 Parent(s): 53f5f60

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -149
README.md CHANGED
@@ -1,199 +1,156 @@
1
  ---
 
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
 
 
11
 
12
  ## Model Details
13
 
14
  ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
 
35
 
36
  ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
 
58
  ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
 
76
  ## Training Details
77
 
78
  ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
 
103
- ## Evaluation
 
 
 
 
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
 
107
- ### Testing Data, Factors & Metrics
108
 
109
- #### Testing Data
 
 
 
110
 
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
 
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
 
125
- [More Information Needed]
 
 
 
 
 
126
 
127
  ### Results
128
 
129
- [More Information Needed]
130
 
131
  #### Summary
132
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
 
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
 
187
- [More Information Needed]
188
 
189
- ## More Information [optional]
190
 
191
- [More Information Needed]
 
 
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
 
 
196
 
197
- ## Model Card Contact
198
 
199
- [More Information Needed]
 
1
  ---
2
+ license: gemma
3
  library_name: transformers
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - armenian
7
+ - llm
8
+ - pretrained
9
+ language:
10
+ - hy
11
+ - ru
12
+ - en
13
  ---
14
 
15
+ # HayGPT-10b
 
 
 
16
 
17
+ HayGPT-10b is the first Armenian large language model that has been pretrained on corpus of Armenian text data. This model is designed to understand and generate Armenian text, making it a pioneering high-quality language model specifically created for the Armenian language.
18
 
19
  ## Model Details
20
 
21
  ### Model Description
22
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ HayGPT-10b is a decoder-only language model based on Google's Gemma-2-9b architecture that has been further pretrained on 10B tokens of Armenian text.
25
 
26
+ A key technical modification in this model is the decoupling of the embedding and LM head layers, allowing the output layer to be trained independently, which can improve the model's ability to generate accurate Armenian text.
27
 
28
+ - **Developed by:** [Gen2B](https://gen2b.ai/) & [NCCAIT](http://arm.ican24.net/)
29
+ - **Model type:** Decoder-only language model
30
+ - **Language(s) (NLP):** Armenian, English, Russian
31
+ - **License:** [gemma](https://ai.google.dev/gemma/terms)
32
 
33
  ## Uses
34
 
35
+ First, install the Transformers library with:
36
+ ```sh
37
+ pip install -U transformers
38
+ ```
39
+
40
+ Then, run this example:
41
+ ```python
42
+ from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
43
+ import torch
44
+
45
+ model_path = "IrbisAI/HayGPT-10b"
46
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
47
+ model = AutoModelForCausalLM.from_pretrained(
48
+ model_path,
49
+ torch_dtype=torch.float16,
50
+ device_map="auto",
51
+ )
52
+
53
+ PROMPT = 'Ինչու է խոտը Կանաչ:'
54
+
55
+ inputs = tokenizer(
56
+ PROMPT,
57
+ return_tensors="pt",
58
+ )
59
+
60
+ print("Generating...")
61
+ generation_output = model.generate(
62
+ input_ids=inputs["input_ids"].cuda(),
63
+ generation_config=GenerationConfig(
64
+ temperature=0.0001,
65
+ repetition_penalty=1.1,
66
+ do_sample=True
67
+ ),
68
+ return_dict_in_generate=True,
69
+ output_scores=True,
70
+ max_new_tokens=256,
71
+ )
72
+ for s in generation_output.sequences:
73
+ print(tokenizer.decode(s))
74
+
75
+ # Կանաչ գույնի առկայությունը բուսականության մեջ պայմանավորված է կլորավուն քլորոֆիլային մոլեկուլների առկայությամբ, որոնք հանդիսանում են լույսի անդրադարձման և տարածման միակ աղբյուրները։ Առողջ բույսերում այդպիսի մոլեկուլներ շատ են, ուստի դրանցից արտացոլվող լույսի երանգը համապատասխանում է կանաչին։ Եթե ​​մոլեկուլների թիվը նվազում է, օրինակ՝ սովի կամ վիրուսային վարակի դեպքում, ապա բույսերի գույնը փոխվում է. Դեղին-շագանակագույն, կարմիր, կապույտ, սև։
76
+ ```
77
 
78
  ### Direct Use
79
 
80
+ HayGPT-10b can be used directly for:
81
+ - Armenian text generation
82
+ - Question answering in Armenian
83
+ - Text completion for Armenian content
84
+ - Understanding Armenian language queries
 
 
 
 
 
 
 
 
 
 
85
 
86
  ## Bias, Risks, and Limitations
87
 
88
+ - The model may reflect biases present in the Armenian language training data
89
+ - Accuracy may vary across different Armenian dialects and regional variations
90
+ - The model may not have up-to-date knowledge beyond its training data
91
+ - Like all language models, it may occasionally generate incorrect or nonsensical responses
92
+ - The model's understanding of specialized Armenian terminology may be limited in certain domains
 
 
 
 
 
 
 
 
 
 
93
 
94
  ## Training Details
95
 
96
  ### Training Data
97
 
98
+ The model was pretrained on a diverse corpus of Armenian text data comprising approximately 10 billion tokens. The dataset includes:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
+ - Armenian web content
101
+ - Armenian literature and publications
102
+ - Armenian news articles
103
+ - Armenian Wikipedia
104
+ - Other publicly available Armenian text sources
105
 
106
+ The data was collected with a focus on representing Armenian language usage across various domains and topics.
107
 
108
+ ### Preprocessing
109
 
110
+ The Armenian text data underwent several preprocessing steps:
111
+ - Cleaning and normalization of Armenian text
112
+ - Removal of duplicate content
113
+ - Tokenization using the base Gemma tokenizer
114
 
115
+ ### Training Procedure
 
 
 
 
 
 
 
 
 
 
116
 
117
+ The model was further pretrained from the google/gemma-2-9b base model using a pretraining approach. A key modification was decoupling the embedding and LM head layers, allowing the output layer to be trained independently. This approach was adopted based on a series of short experiments followed by evaluation on three publicly available Armenian language datasets. The results demonstrated that training the embedding and output layers separately yields higher accuracy according to metrics, compared to both the standard synchronized training of embedding and output layers, as well as configurations with frozen embedding layer, frozen output layer, or both layers frozen. The table below shows the evaluation results across different configurations:
118
 
119
+ | | **train emb / train lm** | *train sync(emb/lm)* | *train emb / freeze lm* | *freeze emb / train lm* | *freeze emb / freeze lm* |
120
+ |---|---|---|---|---|---|
121
+ | [facebook/belebele](https://huggingface.co/datasets/facebook/belebele) | **56.8** | *54.6* | *51.8* | *56.2* | *56.6* |
122
+ | [gayaneghazaryan/SynDARn](https://huggingface.co/datasets/gayaneghazaryan/SynDARn) | **73.0** | *71.3* | *71.1* | *72.5* | *72.0* |
123
+ | [CohenForAI/mGlue-base-44](https://huggingface.co/datasets/CohenForAI/mGlue-base-44) | **34.2** | *33.9* | *33.3* | *34.1* | *34.0* |
124
+ | avg | **54.7** | *53.3* | *52.1* | *54.3* | *54.2* |
125
 
126
  ### Results
127
 
128
+ The model demonstrates strong performance on Armenian language tasks, showing significant improvements over models without Armenian-specific pretraining. Detailed benchmark results will be published in the future.
129
 
130
  #### Summary
131
 
132
+ HayGPT-10b shows promising capabilities for Armenian language understanding and generation, making it a valuable resource for Armenian NLP applications. Additionally, the model serves as an excellent foundation model for further fine-tuning on specific data and domains, allowing developers to adapt it to specialized Armenian language tasks and industry-specific applications.
133
 
134
+ ---
135
 
136
+ ## License and Terms of Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
+ This model is based on Gemma and is distributed according to the [Gemma Terms of Use](https://ai.google.dev/gemma/terms).
139
 
140
+ **Notice**: Gemma is provided under and subject to the Gemma Terms of Use found at [ai.google.dev/gemma/terms](https://ai.google.dev/gemma/terms).
141
 
142
+ ### Modifications Notice
143
 
144
+ This model is a modified version of the original Gemma-2-9b model. The modifications include:
145
+ 1. Further pretraining on 10 billion tokens of Armenian text data
146
+ 2. Decoupling of the embedding and LM head layers to allow independent training of the output layer
147
 
148
+ ### Use Restrictions
149
 
150
+ According to the Gemma Terms of Use, the model should not be used:
151
+ 1. For purposes outlined in the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy)
152
+ 2. In violation of applicable laws and regulations
153
 
154
+ ## Disclaimer of Warranty
155
 
156
+ UNLESS REQUIRED BY APPLICABLE LAW, THE GEMMA SERVICES, AND OUTPUTS, ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING, MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE GEMMA SERVICES OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR USE OR DISTRIBUTION OF ANY OF THE GEMMA SERVICES OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND PERMISSIONS UNDER THIS AGREEMENT.