File size: 2,923 Bytes
9a132c1 a07f221 6bfada2 a07f221 9a132c1 fee7c68 59d8384 fee7c68 a07f221 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
---
license: odc-by
language:
- el
widget:
- text: "Η Ιαπωνία έχει μια ιστορία που ξεκινά πριν από χιλιάδες χρόνια. Οι επιστήμονες πιστεύουν πως οι Ιάπωνες ως ενιαίο σύνολο προέρχονται από πολλές ομάδες, οι οποίες μετανάστευσαν στα νησιά από άλλα σημεία της Ασίας, στα οποία περιλαμβάνονται "
tags:
- text-generation-inference
---
---
language: el
---
# el-llama-smol
## Model:
`el-llama-smol` aims to be the first in a series of LLMs trained mostly in Greek corpora. The model is a small (1bn parameters) version of LLama, with the following configuration.
```json
{
"architectures": ["LLaMAForCausalLM"],
"bos_token_id": 0,
"eos_token_id": 1,
"hidden_act": "silu",
"hidden_size": 2048,
"intermediate_size": 5461,
"initializer_range": 0.02,
"max_sequence_length": 1024,
"model_type": "llama",
"num_attention_heads": 32,
"num_hidden_layers": 24,
"pad_token_id": -1,
"rms_norm_eps": 1e-06,
"transformers_version": "4.28.1",
"use_cache": true,
"vocab_size": 22000
}
```
## Training details:
The current snapshot has been trained for 40hrs with an RTX A6000 GPU (48G), using the `galore_adamw8bit_per_layer` optimizer by Zhao et. al [1] and a context size of 1024 tokens.
## Dataset:
The model is trained on the Greek subset of the [allenai/c4](https://huggingface.co/datasets/allenai/c4) dataset. Text tokenization is performed with a (heavily unoptimized) tokenizer with vocab size of 22000 tokens, trained with [SentencePiece](https://github.com/google/sentencepiece)
## Examples
#### Use a 🤗 pipeline
```python
from transformers import pipeline
pipe = pipeline("text-generation", model="Konstantinos/el_llama_smol")
set_seed(1)
prompt = """Η Ιαπωνία έχει μια ιστορία που ξεκινά πριν από χιλιάδες χρόνια.
Οι επιστήμονες πιστεύουν πως οι Ιάπωνες ως ενιαίο σύνολο προέρχονται από πολλές ομάδες,
οι οποίες μετανάστευσαν στα νησιά από άλλα σημεία της Ασίας, στα οποία περιλαμβάνονται """
ret = pipe(prompt, do_sample=True, top_k=20, temperature=0.85, max_new_tokens=110)
```
#### Load model directly
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Konstantinos/el_llama_smol")
model = AutoModelForCausalLM.from_pretrained("Konstantinos/el_llama_smol")
```
## References
[1] Jiawei Zhao, Zhenyu Zhang, Beidi Chen, Zhangyang Wang, Anima Anandkumar, & Yuandong Tian. (2024). GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projection.
## Citation
TBD
---
license: odc-by
-
|