|
--- |
|
language: |
|
- en |
|
- el |
|
license: apache-2.0 |
|
tags: |
|
- text-generation-inference |
|
- transformers |
|
- llama |
|
- trl |
|
- sft |
|
datasets: |
|
- wikimedia/wikipedia |
|
--- |
|
|
|
# Model details |
|
|
|
GreekLlama-1.1B, is a small base model, based on a custom Llama-like architecture, with 1100048384 (1.1B) parameters. |
|
It is pre-trained on Wikipedia corpus, primarily Greek and English, with a ratio of 60/40 in favor of English language. |
|
Training was only for just 1B tokens, much below the optimal training point and therefore its performance is not great. It is mainly intended for experimental purposes. |
|
|
|
|
|
The model supports both Greek and English languages. |
|
|
|
# Usage: |
|
|
|
```python |
|
# Load model directly |
|
from transformers import AutoTokenizer, AutoModelForCausalLM |
|
|
|
tokenizer = AutoTokenizer.from_pretrained("gsar78/GreekLlama-1.1B-base") |
|
model = AutoModelForCausalLM.from_pretrained("gsar78/GreekLlama-1.1B-base") |
|
|
|
# Generate text |
|
input_text = "Η Ελλάδα είναι " |
|
inputs = tokenizer(input_text, return_tensors="pt") |
|
|
|
# Ensure the inputs are moved to the same device as the model |
|
inputs = {key: value.to(model.device) for key, value in inputs.items()} |
|
|
|
# Generate output |
|
outputs = model.generate(**inputs, max_length=500) |
|
|
|
# Decode the generated text |
|
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True) |
|
print(generated_text) |
|
|
|
``` |
|
|
|
```context |
|
# Output: |
|
Η Ελλάδα είναι μια χώρα της Ευρώπης που βρίσκεται στην κεντρική Ευρώπη. Έχει έκταση 9.700 τ.χλμ. και πληθυσμό 10.500.000 κατοίκους (2011). Πρωτεύουσα της χώρας είναι η Αθήνα. Η Ελλάδα είναι μια πολυεθνική χώρα με πληθυσμό που περιλαμβάνει περίπου 10 εκατομμύρια κατοίκους σε περισσότερες από 100 χώρες. Η Ελλάδα είναι μια πολυμορφική χώρα με πολλές διαφορετικές γλώσσες και πολλές πολιτιστικές παραδόσεις. Η Ελλάδα είναι μια πολυπολιτισμική χώρα με πολλές πολιτιστικές παραδόσεις και πολλές γλώσσες. Η |
|
``` |
|
|
|
or run this Colab: |
|
https://colab.research.google.com/drive/1fEqY_vzPuvQG2SG3W_SgaP4B8zcJvYwX?usp=sharing |
|
|