-
Notifications
You must be signed in to change notification settings - Fork 140
Re-implement Top-P sampling and LogitsWarper
using MLTensor
#274
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
Conversation
f9b6ac3
to
81c9d53
Compare
"BeginDocumentationCommentWithOneLineSummary": false, | ||
"DoNotUseSemicolons": false, | ||
"DontRepeatTypeInStaticProperties": true, | ||
"DontRepeatTypeInStaticProperties": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange that the lint check fails even when this is disabled. FWIW, I also can't reproduce the lint failure locally...
Sources/Models/LanguageModel.swift:132:20: warning: [DontRepeatTypeInStaticProperties] remove the suffix 'Keys' from the name of the variable 'presentKeys'
static let valueCache = "valueCache" | ||
// Output keys | ||
static let logits = "logits" | ||
// swift-format-ignore: DontRepeatTypeInStaticProperties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint check failing despite disabling rule globally in .swift-format
and using this swift-format-ignore:
directive...
@kashif Ha! I just saw your PR opened at the same time and was about to comment the same 😃 I haven't dug in too much, but on first glance, I think #273 has a better top-p and repetition penalty implementations that make better use of |
@mattt no worries! I am test via:
so you can also try that out |
Resolves #271