LucienShui / huggingface-vscode-endpoint-server

starcoder server for huggingface-vscdoe custom endpoint
Apache License 2.0
167 stars 56 forks source link

model generation not working #1

Closed LucienShui closed 1 year ago

LucienShui commented 1 year ago

https://github.com/LucienShui/huggingface-vscode-endpoint-server/blob/91848afd3fea45e5eee86338337baa1c5a582e0e/main.py#L18-L42

File "/home/debian/.local/miniconda3/envs/all-in-one/lib/python3.10/site-packages/transformers/pipelines/text_generation.py", line 251, in _forward
    generated_sequence = self.model.generate(input_ids=input_ids, attention_mask=attention_mask, **generate_kwargs)
  File "/home/debian/.local/miniconda3/envs/all-in-one/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/debian/.local/miniconda3/envs/all-in-one/lib/python3.10/site-packages/transformers/generation/utils.py", line 1485, in generate
    return self.sample(
  File "/home/debian/.local/miniconda3/envs/all-in-one/lib/python3.10/site-packages/transformers/generation/utils.py", line 2565, in sample
    raise ValueError("If `eos_token_id` is defined, make sure that `pad_token_id` is defined.")
ValueError: If `eos_token_id` is defined, make sure that `pad_token_id` is defined.