Safetensors
Russian
mistral
IlyaGusev commited on
Commit
e0e1696
1 Parent(s): fe2154c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -57,6 +57,7 @@ for query in inputs:
57
  }], tokenize=False, add_generation_prompt=True)
58
  data = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
59
  data = {k: v.to(model.device) for k, v in data.items()}
 
60
  output_ids = model.generate(**data, generation_config=generation_config)[0]
61
  output_ids = output_ids[len(data["input_ids"][0]):]
62
  output = tokenizer.decode(output_ids, skip_special_tokens=True).strip()
 
57
  }], tokenize=False, add_generation_prompt=True)
58
  data = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
59
  data = {k: v.to(model.device) for k, v in data.items()}
60
+ data.pop("token_type_ids", None)
61
  output_ids = model.generate(**data, generation_config=generation_config)[0]
62
  output_ids = output_ids[len(data["input_ids"][0]):]
63
  output = tokenizer.decode(output_ids, skip_special_tokens=True).strip()