FrancescoPeriti commited on
Commit
c9f607c
·
verified ·
1 Parent(s): 24b388c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -7,7 +7,7 @@ pipeline_tag: text2text-generation
7
  tags:
8
  - text-generation-inference
9
  ---
10
- # Llama2Dictionary
11
 
12
  <!-- Provide a quick summary of what the model is/does. -->
13
  ```FrancescoPeriti/Llama3Dictionary``` is a fine-tuned version of the ```meta-llama/Meta-Llama-3-8B-Instruct```.
@@ -52,8 +52,8 @@ ft_model_name = "FrancescoPeriti/Llama3Dictionary" # fine-tuned model
52
 
53
  # load models
54
  chat_model = AutoModelForCausalLM.from_pretrained(model_name, device_map='auto')
55
- lama2dictionary = PeftModel.from_pretrained(chat_model, ft_model_name)
56
- lama2dictionary.eval()
57
 
58
  # load tokenizer
59
  tokenizer = AutoTokenizer.from_pretrained(
@@ -127,7 +127,7 @@ with torch.no_grad():
127
  for k in ['input_ids', 'attention_mask']:
128
  model_input[k] = torch.tensor(batch[k]).to('cuda')
129
 
130
- output_ids = lama2dictionary.generate(**model_input,
131
  max_length = max_length * batch_size,
132
  forced_eos_token_id = eos_tokens,
133
  max_time = max_time * batch_size,
 
7
  tags:
8
  - text-generation-inference
9
  ---
10
+ # Llama3Dictionary
11
 
12
  <!-- Provide a quick summary of what the model is/does. -->
13
  ```FrancescoPeriti/Llama3Dictionary``` is a fine-tuned version of the ```meta-llama/Meta-Llama-3-8B-Instruct```.
 
52
 
53
  # load models
54
  chat_model = AutoModelForCausalLM.from_pretrained(model_name, device_map='auto')
55
+ lama3dictionary = PeftModel.from_pretrained(chat_model, ft_model_name)
56
+ lama3dictionary.eval()
57
 
58
  # load tokenizer
59
  tokenizer = AutoTokenizer.from_pretrained(
 
127
  for k in ['input_ids', 'attention_mask']:
128
  model_input[k] = torch.tensor(batch[k]).to('cuda')
129
 
130
+ output_ids = lama3dictionary.generate(**model_input,
131
  max_length = max_length * batch_size,
132
  forced_eos_token_id = eos_tokens,
133
  max_time = max_time * batch_size,