menikev commited on
Commit
a991115
·
verified ·
1 Parent(s): 0fcae8e

Update crypto_analysis_agents.py

Browse files
Files changed (1) hide show
  1. crypto_analysis_agents.py +3 -0
crypto_analysis_agents.py CHANGED
@@ -11,6 +11,9 @@ class CryptoAnalysisAgents:
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
  model = AutoModelForCausalLM.from_pretrained(model_name)
13
 
 
 
 
14
  # Create a custom generation config
15
  generation_config = GenerationConfig(
16
  max_new_tokens=512,
 
11
  tokenizer = AutoTokenizer.from_pretrained(model_name)
12
  model = AutoModelForCausalLM.from_pretrained(model_name)
13
 
14
+ # Set pad_token_id to eos_token_id if pad_token_id is not defined
15
+ model.config.pad_token_id = tokenizer.eos_token_id
16
+
17
  # Create a custom generation config
18
  generation_config = GenerationConfig(
19
  max_new_tokens=512,