Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOresten committed Nov 28, 2024
1 parent 7ef5944 commit ad99284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end
"""
Top_pk(p, k)
A logit transform that masks logits to only include tokens in the top `k` or the top `p` cumulative probability.
A logit transform that masks out logits outside the top `p` cumulative probability *or* top `k` logits.
"""
mutable struct Top_pk{P<:Real,K<:Union{Integer,Nothing}} <: LogitTransform
p::P
Expand All @@ -41,7 +41,7 @@ Top_k(k) = Top_pk(1, k)
"""
Min_p(pbase)
A logit transform that samples from the most probable tokens using the min-p strategy.
A logit transform that masks out logits below `pbase` times the maximum probability.
See: https://arxiv.org/pdf/2407.01082
"""
Expand All @@ -58,7 +58,7 @@ end
"""
Top_nσ(n)
A logit transform that samples within `n` standard deviations of the maximum logit.
A logit transform that masks out logits below `n` standard deviations of the maximum logit.
Top-nσ is temperature-invariant, i.e. the candidate set does not change with temperature.
Expand Down

2 comments on commit ad99284

@AntonOresten
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

  • Add logitsample function for GPU-friendly weighted sampling in the log domain.
  • Add abstract LogitTransform type.
    • Add Temperate type.
    • Add Top_pk type with additional Top_p and Top_k constructors.
    • Add Min_p type.
    • Add Top_nσ type.
  • Deprecate pre-release interface.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request updated: JuliaRegistries/General/120312

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" ad9928452ea084a3dfc05d18872d729d86947de5
git push origin v0.1.0

Please sign in to comment.