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
+
model_creator: LumiOpen
|
11 |
+
model_name: Poro 34B
|
12 |
+
model_type: bloom
|
13 |
+
prompt_template: '{prompt}
|
14 |
+
|
15 |
+
'
|
16 |
+
quantized_by: TheBloke
|
17 |
+
---
|
18 |
+
<!-- markdownlint-disable MD041 -->
|
19 |
+
|
20 |
+
<!-- header start -->
|
21 |
+
<!-- 200823 -->
|
22 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
23 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
24 |
+
</div>
|
25 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
26 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
27 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
28 |
+
</div>
|
29 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
30 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
|
34 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
35 |
+
<!-- header end -->
|
36 |
+
|
37 |
+
# Poro 34B - AWQ
|
38 |
+
- Model creator: [LumiOpen](https://huggingface.co/LumiOpen)
|
39 |
+
- Original model: [Poro 34B](https://huggingface.co/LumiOpen/Poro-34B)
|
40 |
+
|
41 |
+
<!-- description start -->
|
42 |
+
## Description
|
43 |
+
|
44 |
+
This repo contains AWQ model files for [LumiOpen's Poro 34B](https://huggingface.co/LumiOpen/Poro-34B).
|
45 |
+
|
46 |
+
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
47 |
+
|
48 |
+
|
49 |
+
### About AWQ
|
50 |
+
|
51 |
+
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
|
52 |
+
|
53 |
+
AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
|
54 |
+
|
55 |
+
It is supported by:
|
56 |
+
|
57 |
+
- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
|
58 |
+
- [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
|
59 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
60 |
+
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
|
61 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
62 |
+
|
63 |
+
<!-- description end -->
|
64 |
+
<!-- repositories-available start -->
|
65 |
+
## Repositories available
|
66 |
+
|
67 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Poro-34B-AWQ)
|
68 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Poro-34B-GPTQ)
|
69 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Poro-34B-GGUF)
|
70 |
+
* [LumiOpen's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/LumiOpen/Poro-34B)
|
71 |
+
<!-- repositories-available end -->
|
72 |
+
|
73 |
+
<!-- prompt-template start -->
|
74 |
+
## Prompt template: None
|
75 |
+
|
76 |
+
```
|
77 |
+
{prompt}
|
78 |
+
|
79 |
+
```
|
80 |
+
|
81 |
+
<!-- prompt-template end -->
|
82 |
+
|
83 |
+
|
84 |
+
<!-- README_AWQ.md-provided-files start -->
|
85 |
+
## Provided files, and AWQ parameters
|
86 |
+
|
87 |
+
I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
|
88 |
+
|
89 |
+
Models are released as sharded safetensors files.
|
90 |
+
|
91 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
92 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
93 |
+
| [main](https://huggingface.co/TheBloke/Poro-34B-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 2048 | 20.98 GB
|
94 |
+
|
95 |
+
<!-- README_AWQ.md-provided-files end -->
|
96 |
+
|
97 |
+
<!-- README_AWQ.md-text-generation-webui start -->
|
98 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
99 |
+
|
100 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
101 |
+
|
102 |
+
It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
|
103 |
+
|
104 |
+
1. Click the **Model tab**.
|
105 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/Poro-34B-AWQ`.
|
106 |
+
3. Click **Download**.
|
107 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
108 |
+
5. In the top left, click the refresh icon next to **Model**.
|
109 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `Poro-34B-AWQ`
|
110 |
+
7. Select **Loader: AutoAWQ**.
|
111 |
+
8. Click Load, and the model will load and is now ready for use.
|
112 |
+
9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
|
113 |
+
10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
114 |
+
<!-- README_AWQ.md-text-generation-webui end -->
|
115 |
+
|
116 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
117 |
+
## Multi-user inference server: vLLM
|
118 |
+
|
119 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
120 |
+
|
121 |
+
- Please ensure you are using vLLM version 0.2 or later.
|
122 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter.
|
123 |
+
|
124 |
+
For example:
|
125 |
+
|
126 |
+
```shell
|
127 |
+
python3 -m vllm.entrypoints.api_server --model TheBloke/Poro-34B-AWQ --quantization awq --dtype auto
|
128 |
+
```
|
129 |
+
|
130 |
+
- When using vLLM from Python code, again set `quantization=awq`.
|
131 |
+
|
132 |
+
For example:
|
133 |
+
|
134 |
+
```python
|
135 |
+
from vllm import LLM, SamplingParams
|
136 |
+
|
137 |
+
prompts = [
|
138 |
+
"Tell me about AI",
|
139 |
+
"Write a story about llamas",
|
140 |
+
"What is 291 - 150?",
|
141 |
+
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
|
142 |
+
]
|
143 |
+
prompt_template=f'''{prompt}
|
144 |
+
'''
|
145 |
+
|
146 |
+
prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
|
147 |
+
|
148 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
149 |
+
|
150 |
+
llm = LLM(model="TheBloke/Poro-34B-AWQ", quantization="awq", dtype="auto")
|
151 |
+
|
152 |
+
outputs = llm.generate(prompts, sampling_params)
|
153 |
+
|
154 |
+
# Print the outputs.
|
155 |
+
for output in outputs:
|
156 |
+
prompt = output.prompt
|
157 |
+
generated_text = output.outputs[0].text
|
158 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
159 |
+
```
|
160 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
161 |
+
|
162 |
+
<!-- README_AWQ.md-use-from-tgi start -->
|
163 |
+
## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
|
164 |
+
|
165 |
+
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
166 |
+
|
167 |
+
Example Docker parameters:
|
168 |
+
|
169 |
+
```shell
|
170 |
+
--model-id TheBloke/Poro-34B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
171 |
+
```
|
172 |
+
|
173 |
+
Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
|
174 |
+
|
175 |
+
```shell
|
176 |
+
pip3 install huggingface-hub
|
177 |
+
```
|
178 |
+
|
179 |
+
```python
|
180 |
+
from huggingface_hub import InferenceClient
|
181 |
+
|
182 |
+
endpoint_url = "https://your-endpoint-url-here"
|
183 |
+
|
184 |
+
prompt = "Tell me about AI"
|
185 |
+
prompt_template=f'''{prompt}
|
186 |
+
'''
|
187 |
+
|
188 |
+
client = InferenceClient(endpoint_url)
|
189 |
+
response = client.text_generation(prompt,
|
190 |
+
max_new_tokens=128,
|
191 |
+
do_sample=True,
|
192 |
+
temperature=0.7,
|
193 |
+
top_p=0.95,
|
194 |
+
top_k=40,
|
195 |
+
repetition_penalty=1.1)
|
196 |
+
|
197 |
+
print(f"Model output: ", response)
|
198 |
+
```
|
199 |
+
<!-- README_AWQ.md-use-from-tgi end -->
|
200 |
+
|
201 |
+
<!-- README_AWQ.md-use-from-python start -->
|
202 |
+
## Inference from Python code using Transformers
|
203 |
+
|
204 |
+
### Install the necessary packages
|
205 |
+
|
206 |
+
- Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
|
207 |
+
- Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
|
208 |
+
|
209 |
+
```shell
|
210 |
+
pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
|
211 |
+
```
|
212 |
+
|
213 |
+
Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
|
214 |
+
|
215 |
+
If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
|
216 |
+
|
217 |
+
```shell
|
218 |
+
pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
|
219 |
+
```
|
220 |
+
|
221 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
222 |
+
|
223 |
+
```shell
|
224 |
+
pip3 uninstall -y autoawq
|
225 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
226 |
+
cd AutoAWQ
|
227 |
+
pip3 install .
|
228 |
+
```
|
229 |
+
|
230 |
+
### Transformers example code (requires Transformers 4.35.0 and later)
|
231 |
+
|
232 |
+
```python
|
233 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
234 |
+
|
235 |
+
model_name_or_path = "TheBloke/Poro-34B-AWQ"
|
236 |
+
|
237 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
|
238 |
+
model = AutoModelForCausalLM.from_pretrained(
|
239 |
+
model_name_or_path,
|
240 |
+
low_cpu_mem_usage=True,
|
241 |
+
device_map="cuda:0"
|
242 |
+
)
|
243 |
+
|
244 |
+
# Using the text streamer to stream output one token at a time
|
245 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
246 |
+
|
247 |
+
prompt = "Tell me about AI"
|
248 |
+
prompt_template=f'''{prompt}
|
249 |
+
'''
|
250 |
+
|
251 |
+
# Convert prompt to tokens
|
252 |
+
tokens = tokenizer(
|
253 |
+
prompt_template,
|
254 |
+
return_tensors='pt'
|
255 |
+
).input_ids.cuda()
|
256 |
+
|
257 |
+
generation_params = {
|
258 |
+
"do_sample": True,
|
259 |
+
"temperature": 0.7,
|
260 |
+
"top_p": 0.95,
|
261 |
+
"top_k": 40,
|
262 |
+
"max_new_tokens": 512,
|
263 |
+
"repetition_penalty": 1.1
|
264 |
+
}
|
265 |
+
|
266 |
+
# Generate streamed output, visible one token at a time
|
267 |
+
generation_output = model.generate(
|
268 |
+
tokens,
|
269 |
+
streamer=streamer,
|
270 |
+
**generation_params
|
271 |
+
)
|
272 |
+
|
273 |
+
# Generation without a streamer, which will include the prompt in the output
|
274 |
+
generation_output = model.generate(
|
275 |
+
tokens,
|
276 |
+
**generation_params
|
277 |
+
)
|
278 |
+
|
279 |
+
# Get the tokens from the output, decode them, print them
|
280 |
+
token_output = generation_output[0]
|
281 |
+
text_output = tokenizer.decode(token_output)
|
282 |
+
print("model.generate output: ", text_output)
|
283 |
+
|
284 |
+
# Inference is also possible via Transformers' pipeline
|
285 |
+
from transformers import pipeline
|
286 |
+
|
287 |
+
pipe = pipeline(
|
288 |
+
"text-generation",
|
289 |
+
model=model,
|
290 |
+
tokenizer=tokenizer,
|
291 |
+
**generation_params
|
292 |
+
)
|
293 |
+
|
294 |
+
pipe_output = pipe(prompt_template)[0]['generated_text']
|
295 |
+
print("pipeline output: ", pipe_output)
|
296 |
+
|
297 |
+
```
|
298 |
+
<!-- README_AWQ.md-use-from-python end -->
|
299 |
+
|
300 |
+
<!-- README_AWQ.md-compatibility start -->
|
301 |
+
## Compatibility
|
302 |
+
|
303 |
+
The files provided are tested to work with:
|
304 |
+
|
305 |
+
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
|
306 |
+
- [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
|
307 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
|
308 |
+
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
|
309 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
|
310 |
+
|
311 |
+
<!-- README_AWQ.md-compatibility end -->
|
312 |
+
|
313 |
+
<!-- footer start -->
|
314 |
+
<!-- 200823 -->
|
315 |
+
## Discord
|
316 |
+
|
317 |
+
For further support, and discussions on these models and AI in general, join us at:
|
318 |
+
|
319 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
320 |
+
|
321 |
+
## Thanks, and how to contribute
|
322 |
+
|
323 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
324 |
+
|
325 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
326 |
+
|
327 |
+
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
328 |
+
|
329 |
+
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
330 |
+
|
331 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
332 |
+
|
333 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
334 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
335 |
+
|
336 |
+
**Special thanks to**: Aemon Algiz.
|
337 |
+
|
338 |
+
**Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
|
339 |
+
|
340 |
+
|
341 |
+
Thank you to all my generous patrons and donaters!
|
342 |
+
|
343 |
+
And thank you again to a16z for their generous grant.
|
344 |
+
|
345 |
+
<!-- footer end -->
|
346 |
+
|
347 |
+
# Original model card: LumiOpen's Poro 34B
|
348 |
+
|
349 |
+
<div align="center">
|
350 |
+
<img src="./poro-logo.png" width="200px">
|
351 |
+
</div>
|
352 |
+
|
353 |
+
# Poro 34B Model Card
|
354 |
+
|
355 |
+
_**NOTE:** This is a **research checkpoint** of a model for which **training has not been completed.** It is being provided in its current state for research and testing purposes. **Care should be taken when using the outputs of the model.** Once pretraining has completed we intend to release additional instruction-tuned and chat-tuned varieties._
|
356 |
+
|
357 |
+
Poro is a 34B parameter decoder-only transformer pretrained on Finnish, English and code. It is being trained on 1 trillion tokens (500 billion as of this release). Poro is a fully open source model and is made available under the Apache 2.0 License.
|
358 |
+
|
359 |
+
Poro was created in a collaboration between [SiloGen](https://www.silo.ai/silogen) from [Silo AI](https://www.silo.ai/), the [TurkuNLP group](https://turkunlp.org/) of the University of Turku, and [High Performance Language Technologies](https://hplt-project.org/) (HPLT). Training was conducted on the [LUMI supercomputer](https://www.lumi-supercomputer.eu/), using compute resources generously provided by [CSC](https://csc.fi/) - IT Center for Science, Finland.
|
360 |
+
|
361 |
+
This project is part of an ongoing effort to create open source large language models for non-English and especially low resource languages like Finnish. Through the combination of English and Finnish training data we get a model that outperforms previous Finnish only models, while also being fluent in English and code, and capable of basic translation between English and Finnish.
|
362 |
+
|
363 |
+
Poro 34B is only the first model of our model family. Work is already underway on our next models which will support additional languages, and include features like flash attention, rotary embeddings, and grouped query attention.
|
364 |
+
|
365 |
+
_What does Poro mean?_ Poro is the Finnish word for Reindeer! 🦌 These animals are native to Finland and hold a significant and historical role in Finnish culture.
|
366 |
+
|
367 |
+
## Model Overview
|
368 |
+
_**NOTE:** In addition to being an early research release, Poro is a base model which needs further fine tuning for most use cases._
|
369 |
+
|
370 |
+
Poro is a generative pretrained transformer using a BLOOM architecture, and makes use of ALiBi embeddings to support context length extrapolation at inference time.
|
371 |
+
|
372 |
+
| Hyperparameter | Value |
|
373 |
+
| :------------- | :----: |
|
374 |
+
| n_parameters | 34.2B |
|
375 |
+
| n_layers | 54 |
|
376 |
+
| n_heads | 56 |
|
377 |
+
| d_model | 7168 |
|
378 |
+
| vocab_size | 128000 |
|
379 |
+
| sequence_length | 2048 |
|
380 |
+
|
381 |
+
## Poro Research Checkpoints
|
382 |
+
|
383 |
+
Checkpoints are available as branches in the repository. Checkpoints will be released roughly every 100B tokens. The main branch will always point to the latest checkpoint. The following checkpoints are available:
|
384 |
+
|
385 |
+
* [100B](https://huggingface.co/LumiOpen/Poro-34B/tree/100B)
|
386 |
+
* [200B](https://huggingface.co/LumiOpen/Poro-34B/tree/200B)
|
387 |
+
* [300B](https://huggingface.co/LumiOpen/Poro-34B/tree/300B)
|
388 |
+
* [400B](https://huggingface.co/LumiOpen/Poro-34B/tree/400B)
|
389 |
+
* [500B](https://huggingface.co/LumiOpen/Poro-34B/tree/500B)
|
390 |
+
|
391 |
+
The transformers library allows you to load a checkpoint from a branch as follows:
|
392 |
+
|
393 |
+
```python
|
394 |
+
branch = "200B"
|
395 |
+
model = transformers.AutoModelForCausalLM.from_pretrained(
|
396 |
+
"LumiOpen/Poro-34B",
|
397 |
+
torch_dtype=torch.bfloat16,
|
398 |
+
revision=branch,
|
399 |
+
)
|
400 |
+
```
|
401 |
+
|
402 |
+
## Training
|
403 |
+
|
404 |
+
Poro was trained on the LUMI supercomputer, using 512 AMD MI250X GPUs. Each MI250X GPU has two Graphics Complex Dies (GCDs) for a world size of 1024 during training, using activation checkpointing, a micro batch size of 1, gradient accumulation of 16, and a 3D parallelism strategy of TP=2, PP=4, DP=128.
|
405 |
+
|
406 |
+
Training began in September 2023 using a [custom fork](https://github.com/TurkuNLP/Megatron-DeepSpeed) of the Megatron-Deepspeed framework.
|
407 |
+
|
408 |
+
## Training Hyperparameters
|
409 |
+
|
410 |
+
| Hyperparameter | Value | Comment |
|
411 |
+
| :------------: | :---: | :------:|
|
412 |
+
| Precision | bfloat16 | |
|
413 |
+
| Optimizer | AdamW | |
|
414 |
+
| Learning rate | 1.5e-4 | 10B tokens warm-up, cosine decay to 2e-5 |
|
415 |
+
| Weight decay | 1e-1 | |
|
416 |
+
| Batch size | 2048 | 2048 samples x 2048 tokens = 4194304 tokens |
|
417 |
+
|
418 |
+
## Tokenizer
|
419 |
+
|
420 |
+
Poro uses a custom 128K Bloom tokenizer trained on the same English, Finnish and Code dataset used to train the model.
|
421 |
+
|
422 |
+
## Dataset
|
423 |
+
Poro is being trained on a 1 trillion token mixed dataset of English, Finnish and Code.
|
424 |
+
|
425 |
+
| Dataset | Notes | Percentage | Epochs | Tokens |
|
426 |
+
| :-----: | :---: | :--------: | :----: | :----: |
|
427 |
+
| SlimPajama | Excluding books3 data | 54.16% | 1x | 541.7B |
|
428 |
+
| Finnish | TurkuNLP Finnish dataset | 13.05% | 4x | 131.5B |
|
429 |
+
| Tatoeba | English/Finnish sentence pairs | 0.81% | 1x | 8.0B |
|
430 |
+
| Starcoder | | 31.53% | 1.52x | 315.4B |
|
431 |
+
| Project Gutenberg | from Dolma dataset | 0.46% | 1x | 4.5B |
|
432 |
+
|
433 |
+
The Finnish dataset is a combination of many Finnish resources:
|
434 |
+
|
435 |
+
* [Finnish Internet Parsebank](https://turkunlp.org/finnish_nlp.html)
|
436 |
+
* [mC4 multilingual colossal, cleaned Common Crawl](https://huggingface.co/datasets/mc4)
|
437 |
+
* [Common Crawl Finnish](https://github.com/turkunlp/CC-Fi)
|
438 |
+
* [Finnish Wikipedia](https://fi.wikipedia.org/wiki)
|
439 |
+
* [Lönnrot Projekti Lönnrot](http://www.lonnrot.net/)
|
440 |
+
* [Suomi24 The Suomi 24 Corpus 2001-2020](http://urn.fi/urn:nbn:fi:lb-2021101527)
|
441 |
+
* [Reddit r/Suomi submissions and comments](https://www.reddit.com/r/Suomi)
|
442 |
+
* [STT Finnish News Agency Archive 1992-2018](http://urn.fi/urn:nbn:fi:lb-2019041501)
|
443 |
+
* [Yle Finnish News Archive 2011-2018](http://urn.fi/urn:nbn:fi:lb-2017070501)
|
444 |
+
* [Yle Finnish News Archive 2019-2020](http://urn.fi/urn:nbn:fi:lb-2021050401)
|
445 |
+
* [Yle News Archive Easy-to-read Finnish 2011-2018](http://urn.fi/urn:nbn:fi:lb-2019050901)
|
446 |
+
* [Yle News Archive Easy-to-read Finnish 2019-2020](http://urn.fi/urn:nbn:fi:lb-2021050701)
|
447 |
+
|
448 |
+
## Evaluation Results
|
449 |
+
|
450 |
+
Despite the early training stage, Poro already exceeds the performance of the Finnish-only [FinGPT](https://turkunlp.org/gpt3-finnish) language models on the [FIN-bench](https://github.com/TurkuNLP/FIN-bench) Finnish language benchmark.
|
451 |
+
|
452 |
+
Full evaluation results will be published with the final model.
|
453 |
+
|
454 |
+
## Ethical Considerations and Limitations
|
455 |
+
|
456 |
+
_Poro 34B is a release of a partially trained model, and special care should be taken when using any output._
|
457 |
+
|
458 |
+
Poro is an advanced language model, primarily optimized for English, Finnish and code, with no meaningful proficiency in any other languages. As with most AI-driven systems, Poro is a product of the vast data it has been trained on, which may reflect the imperfections, biases, and idiosyncrasies of the wider web. Poro may, at times, produce outputs that can be considered inaccurate, prejudiced, or controversial. Users and developers engaging with Poro should exercise discretion and consider additional evaluation and customization to ensure the model's responses align with their specific needs and ethical standards.
|
459 |
+
|
460 |
+
## License
|
461 |
+
|
462 |
+
Poro is released under the Apache 2.0 license.
|