Update README.md
Browse files
README.md
CHANGED
@@ -9,18 +9,44 @@ library_name: transformers
|
|
9 |
license: other
|
10 |
---
|
11 |
|
12 |
-
|
13 |
# LLäMmlein 7B
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
18 |
### Usage
|
19 |
-
|
|
|
20 |
```python
|
21 |
-
from transformers import
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
license: other
|
10 |
---
|
11 |
|
|
|
12 |
# LLäMmlein 7B
|
13 |
+
LLäMmlein 7B is a German LLaMa model trained from scratch using our adapted [Tinyllama](https://github.com/jzhang38/TinyLlama) codebase on the German portion of [RedPajama V2](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2).
|
14 |
+
To enhance data quality, we additionally deduplicated the dataset on paragraph level and filtered it using a token-to-word ratio filter. The resulting dataset can be found [here](https://huggingface.co/datasets/LSX-UniWue/LLaMmlein-Dataset).
|
15 |
+
We provide three model sizes:
|
16 |
+
* [LLäMmlein 7B](https://huggingface.co/LSX-UniWue/LLaMmlein_7B) ← You are here
|
17 |
+
* [LLäMmlein 1B](https://huggingface.co/LSX-UniWue/LLaMmlein_1B)
|
18 |
+
* [LLäMmlein 120M](https://huggingface.co/LSX-UniWue/LLaMmlein_120M)
|
19 |
+
Find more details on our page our [page](https://www.informatik.uni-wuerzburg.de/datascience/projects/nlp/llammlein/) and our [preprint](https://arxiv.org/abs/2411.11171)!
|
20 |
### Usage
|
21 |
+
You can use LLäMmlein with the `transformers` library.
|
22 |
+
(Optional: install `flash-attn` to achieve highest efficiency.)
|
23 |
```python
|
24 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
25 |
+
model_id = "LSX-UniWue/LLaMmlein_7B"
|
26 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
27 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
28 |
+
```
|
29 |
+
### Intermediate Checkpoints
|
30 |
+
In addition to the final model checkpoint, we publish intermediate checkpoints throughout the full training process as unique branches in this repository.
|
31 |
+
A specific checkpoint can be loaded like this:
|
32 |
+
```python
|
33 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
34 |
+
model_id = "LSX-UniWue/LLaMmlein_7B"
|
35 |
+
revision = "iter-00420000-ckpt"
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
|
37 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, revision=revision)
|
38 |
+
```
|
39 |
+
Next to the model itself each branch contains all datapoints that were used to train the model up to that point.
|
40 |
+
In the correspinding folder, named after the checkpoint, you can find several `.log` files (depending on the number of GPUs) of the following format:
|
41 |
+
```json
|
42 |
+
{"time": 1739809392.679516,
|
43 |
+
"iter_num": 0,
|
44 |
+
"data_id": ["sha1:EDQMBYDCYBLDAZH3MGYM276BM2DEHPPJ", "sha1:SAJCI75DRHZZFGQORV66NB5FVWUAVLFH", "sha1:7RBZV2MCEM4TUGBBWGTFQAKTWUOGETZU", "sha1:234M32IMLZF7455AKOFWDP6HT6YXAYB4", "sha1:2BIZ7LLSHRK5GUGPZM2GM55APTDKBUG2", "sha1:OF7OI77ZT7ROXGMB6LL4RSRANX7REAYK", "sha1:LGPUOCOV3MKETI5F3IHVGZPD4M26NNJL", "sha1:SHIHUW7FJTP5YHFFV2JZ2CAHUVMKK7XG"],
|
45 |
+
"file_id": [0, 0, 0, 0, 0, 0, 0, 0],
|
46 |
+
"process_rank": 0}
|
47 |
+
```
|
48 |
+
Note: Our earlier models from the paper, which do not include data logging, are available at:
|
49 |
+
* [LLäMmlein 1B prerelease](https://huggingface.co/LSX-UniWue/LLaMmlein_1B_prerelease)
|
50 |
+
* [LLäMmlein 120M prerelease](https://huggingface.co/LSX-UniWue/LLaMmlein_120M_prerelease)
|
51 |
+
### License
|
52 |
+
We release the LLäMmlein models under a research-only RAIL-M license. See [license.md](./license.md) for details.
|