-
Notifications
You must be signed in to change notification settings - Fork 24
Support LLM api of the new trtllm (0.20.0) #26
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
Changes from 10 commits
e979b9c
910c7a0
51903ea
15532e7
fff779c
e525d7e
e1490fc
cc08f36
f4b2875
c875c17
98bd4f8
650c428
deb2c98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
hchings marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: All examples in trtllm are python script. So "example_notebook" dir name can be misleading. But up to you on how LP zoo would like to reorganize examples.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can rename the folder to "examples"?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I think that'd be better. Can you make the change? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from transformers import AutoTokenizer | ||
| from logits_processor_zoo.trtllm import PreventHallucinationLogitsProcessor | ||
| from utils import TRTLLMTester, get_parser | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| args = get_parser() | ||
|
|
||
| tokenizer = AutoTokenizer.from_pretrained(args.model_name) | ||
| llm_tester = TRTLLMTester(args.model_name, args.backend) | ||
|
|
||
| lp = PreventHallucinationLogitsProcessor(tokenizer, minp=0.25, tolerate=1) | ||
| llm_tester.run([args.prompt], logits_processor=lp) |
Uh oh!
There was an error while loading. Please reload this page.