nunonmg commited on
Commit
407df6d
1 Parent(s): dd3bcdf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -19
README.md CHANGED
@@ -61,21 +61,21 @@ Here's how you can run the model using the `pipeline()` function from 🤗 Trans
61
  import torch
62
  from transformers import pipeline
63
 
64
- pipe = pipeline("text-generation", model="Unbabel/TowerInstruct-v0.1", torch_dtype=torch.bfloat16, device_map="auto")
65
 
66
- # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
67
  messages = [
68
- {"role": "user", "content": "Translate the following text from English into Portuguese.\nEnglish: A group of researchers has released a new model for translation-related tasks.\nPortuguese:"},
69
  ]
70
  prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
71
  outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
72
- print(outputs[0]["generated_text"])
73
- # <|system|>
74
- # You are a friendly chatbot who always responds in the style of a pirate.</s>
75
- # <|user|>
76
- # How many helicopters can a human eat in one sitting?</s>
77
- # <|assistant|>
78
- # Ah, me hearty matey! But yer question be a puzzler! A human cannot eat a helicopter in one sitting, as helicopters are not edible. They be made of metal, plastic, and other materials, not food!
79
  ```
80
 
81
 
@@ -125,18 +125,17 @@ Write sth about Axolotl.
125
 
126
  The following hyperparameters were used during training:
127
 
128
- learning_rate: 5e-07
129
- train_batch_size: 2
130
- eval_batch_size: 4
131
  seed: 42
132
  distributed_type: multi-GPU
133
- num_devices: 16
134
- total_train_batch_size: 32
135
- total_eval_batch_size: 64
136
  optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
137
- lr_scheduler_type: linear
138
- lr_scheduler_warmup_ratio: 0.1
139
- num_epochs: 3.0
 
 
140
 
141
  ## Citation
142
 
 
61
  import torch
62
  from transformers import pipeline
63
 
64
+ pipe = pipeline(text-generation”, model=“Unbabel/TowerInstruct-v0.1", torch_dtype=torch.bfloat16, device_map=“cuda:3”)
65
 
66
+ # We use the tokenizers chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
67
  messages = [
68
+ {role”: user”, content”: Translate the following text from Portuguese into English.\nPortuguese: Um grupo de investigadores lançou um novo modelo para tarefas relacionadas com tradução.\nEnglish:“},
69
  ]
70
  prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
71
  outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
72
+ print(outputs[0][generated_text])
73
+ # <|im_start|>user
74
+ # Translate the following text from Portuguese into English.
75
+ # Portuguese: Um grupo de investigadores lançou um novo modelo para tarefas relacionadas com tradução.
76
+ # English:<|im_end|>
77
+ # <|im_start|>assistant
78
+ # A group of researchers has launched a new model for translation-related tasks.
79
  ```
80
 
81
 
 
125
 
126
  The following hyperparameters were used during training:
127
 
128
+ learning_rate: 7e-06
 
 
129
  seed: 42
130
  distributed_type: multi-GPU
131
+ num_devices: 4
132
+ total_train_batch_size: 256
 
133
  optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
134
+ lr_scheduler_type: cosine
135
+ lr_scheduler_warmup_steps: 500
136
+ weight_decay: 0.01
137
+ num_epochs: 4
138
+ max_seq_length: 2048
139
 
140
  ## Citation
141