eliseobao commited on
Commit
fb6a9ed
·
verified ·
1 Parent(s): f8fd39b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -2
README.md CHANGED
@@ -46,7 +46,28 @@ This model is a continued pretraining version of [meta-llama/Llama-3.1-8B-Instru
46
 
47
  ## How to Get Started with the Model
48
 
49
- Use the code below to get started with the model.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  [More Information Needed]
52
 
@@ -94,7 +115,7 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
94
  - **Hardware Type:** 4x NVIDIA A100 SXM4 80 GB (TDP of 400W)
95
  - **Hours used:** 60
96
  - **Cloud Provider:** Private infrastructure
97
- - **Carbon Emitted:** 10.37 kgCO$_2$eq
98
 
99
  ## Citation
100
 
 
46
 
47
  ## How to Get Started with the Model
48
 
49
+ ```python
50
+ import transformers
51
+ import torch
52
+
53
+ model_id = "irlab-udc/Llama-3.1-8B-Instruct-Galician"
54
+
55
+ pipeline = transformers.pipeline(
56
+ "text-generation",
57
+ model=model_id,
58
+ model_kwargs={"torch_dtype": torch.bfloat16},
59
+ device_map="auto",
60
+ )
61
+
62
+ messages = [
63
+ {"role": "system", "content": "You are a conversational AI that always responds in Galician."},
64
+ {"role": "user", "content": "Cal é a principal vantaxe de usar Scrum?"},
65
+ ]
66
+
67
+ outputs = pipeline(messages, max_new_tokens=512)
68
+
69
+ print(outputs[0]["generated_text"][-1]["content"])
70
+ ```
71
 
72
  [More Information Needed]
73
 
 
115
  - **Hardware Type:** 4x NVIDIA A100 SXM4 80 GB (TDP of 400W)
116
  - **Hours used:** 60
117
  - **Cloud Provider:** Private infrastructure
118
+ - **Carbon Emitted:** 10.37 Kg. CO₂ eq.
119
 
120
  ## Citation
121