File size: 1,897 Bytes
2df1ede
 
3e9a30a
 
 
b96668a
 
 
 
2df1ede
 
3e9a30a
2df1ede
3e9a30a
 
2df1ede
3e9a30a
2df1ede
3e9a30a
 
 
 
2df1ede
3e9a30a
 
2df1ede
3e9a30a
2df1ede
3e9a30a
 
 
2df1ede
3e9a30a
2df1ede
3e9a30a
 
 
 
 
 
2df1ede
3e9a30a
 
 
2df1ede
3e9a30a
 
 
 
 
 
 
 
2df1ede
3e9a30a
 
 
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
---
library_name: transformers
language:
- la
- en
datasets:
- hathibelagal/clean_latin
base_model:
- meta-llama/Llama-3.2-3B
---

# Model Card for Llama-3.2-Latin

`hathibelagal/llama-3.2-latin` is a finetuned version of the LLaMA-3.2-3B model, optimized for generating and understanding Latin text across various historical periods, from ancient to modern Neo-Latin.
At this point, it generates content with accurate use of tenses (e.g., pluperfect, subjunctive), cases, and complex structures (e.g., concessive, temporal clauses).

**Intended Use**

- Suitable for tasks involving Latin text generation, translation, or analysis, such as generating Classical Latin prose, completing sentences, or aiding in Latin education. Best for short, context-specific prompts due to coherence limitations.
- Not recommended for long-form narrative generation or tasks requiring strict contextual consistency until coherence improves.
  
**Ethical Considerations**

- Bias: The model may reflect biases in the training dataset, such as overrepresentation of certain Latin styles (e.g., ecclesiastical Latin) leading to tonal shifts in output.
- Usage: Generated text should be reviewed for accuracy, especially in educational or scholarly contexts.

## Usage Example

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

repo_id = "hathibelagal/llama-3.2-latin"

tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
    repo_id,
    torch_dtype=torch.float16,
    device_map="auto"
)

prompt = "Libellus vere aureus"
inputs = tokenizer.encode(prompt, return_tensors="pt")
inputs = inputs.to(model.device)

outputs = model.generate(
    inputs,
    max_new_tokens=100,
    do_sample=True,
    top_p=0.9,
    temperature=0.6,
    repetition_penalty=1.2
)

print(tokenizer.batch_decode(
    outputs, skip_special_tokens=True)[0])
```