Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model_kwargs are not used by the model 'token_type_ids' #6

Open
johanteekens opened this issue Nov 19, 2023 · 0 comments
Open

model_kwargs are not used by the model 'token_type_ids' #6

johanteekens opened this issue Nov 19, 2023 · 0 comments

Comments

@johanteekens
Copy link

johanteekens commented Nov 19, 2023

Thank for the nice demo, it took me a bit to get it going. I suggest adding:

tokenizer_outputs_to_remove=["token_type_ids"] to app.py
llm = HuggingFaceLLM(context_window=4096,
max_new_tokens=256,
system_prompt=system_prompt,
query_wrapper_prompt=query_wrapper_prompt,
model=model,
tokenizer=tokenizer,
tokenizer_kwargs={"max_length": 4096},
tokenizer_outputs_to_remove=["token_type_ids"]
)

and max_length=xxxx to the Jupyter notebook:
output = model.generate(input_ids=inputs['input_ids'], attention_mask=inputs['attention_mask'], streamer=streamer,
use_cache=True, max_length=225)

Adding these will still allow to run the demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant