Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JamesKunstle
Copy link
Contributor

@JamesKunstle JamesKunstle commented Mar 20, 2024

Resolves #452

May fix #159, #137

Adds more stop-tokens to ChatFormatter object:
[<|endoftext|>, <|system|>, <|user|>, <|assistant|>]

@JamesKunstle
Copy link
Contributor Author

@xukai92

cli/server.py Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this to

chatFormatterResponse.stop.extend(["<|system|>", "<|user|>", "<|assistant|>"])

(with properly formatting to make linter happy)

i think this reads better as we are actually adding more EOS tokens to the existing list which is set to be only the eos_token in the Jinja2ChatFormatter initialization.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure, will update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesKunstle any update on this?

Copy link
Member

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesKunstle Just wondering if this is covered by the work done in #559 and #547?

@xukai92
Copy link
Member

xukai92 commented Mar 26, 2024

this is to fix #159

@JamesKunstle
Copy link
Contributor Author

JamesKunstle commented Apr 9, 2024

@xukai92 functional test caught a problem- I misinterpreted the return from llama_chat_format.Jinja2ChatFormatter as a ChatFormatterResponse object, which has the stop member. This is incorrect- it returns an object that when called returns a response, a downstream pattern. I think we should investigate an alternative to adding more stop tokens.

-> can close this PR without merging, it doesn't fix the problem.

@hickeyma
Copy link
Member

Closing as per @JamesKunstle comment in #699 (comment)

@hickeyma hickeyma closed this Apr 15, 2024
@hickeyma hickeyma deleted the more-eos-tokens branch April 15, 2024 09:23
jgato pushed a commit to jgato/instructlab that referenced this pull request Jun 21, 2024
We need to stale things!

---------

Signed-off-by: JJ Asghar <[email protected]>
Co-authored-by: BJ Hargrave <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adding more stop tokens to lab serve BUG: Extraneous padding in response

4 participants