mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
update
This commit is contained in:
@@ -108,6 +108,9 @@ class LlamaForTextGeneration(MsModelMixin, LlamaForCausalLM, TorchModel):
|
||||
max_length=gen_kwargs['max_length'],
|
||||
tokenizer=tokenizer)
|
||||
input_ids = prompt_ids.to(self.device)
|
||||
|
||||
print(f'>>>input_ids in text_generation: {input_ids}')
|
||||
|
||||
generate_ids = self.generate(input_ids, **gen_kwargs)
|
||||
# remove input tokens
|
||||
generate_ids = generate_ids[:, input_ids.shape[1]:]
|
||||
|
||||
Reference in New Issue
Block a user