jmprcp commited on
Commit
9bcaee9
1 Parent(s): ab0ba57

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -1
README.md CHANGED
@@ -43,7 +43,24 @@ The model is not guaranteed to perform well for languages other than the 10 lang
43
 
44
  ## Bias, Risks, and Limitations
45
 
46
- TowerBase-v0.1 has not been aligned to human preferences, so the model may generate problematic outputs (e.g., hallucinations, harmful content, or false statements).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  ### Training Data
49
 
 
43
 
44
  ## Bias, Risks, and Limitations
45
 
46
+ TowerBase-v0.1 has not been aligned to human preferences, so the model may generate problematic outputs (e.g., hallucinations, harmful content, or false statements).
47
+
48
+ ## Run the model
49
+
50
+ ```python
51
+ from transformers import AutoModelForCausalLM, AutoTokenizer
52
+
53
+ model_id = "Unbabel/TowerBase-7B-v0.1"
54
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
55
+
56
+ model = AutoModelForCausalLM.from_pretrained(model_id)
57
+
58
+ text = "English: My name is TowerBase.\nPortuguese:"
59
+ inputs = tokenizer(text, return_tensors="pt")
60
+
61
+ outputs = model.generate(**inputs, max_new_tokens=20)
62
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
63
+ ```
64
 
65
  ### Training Data
66