Skip to content

Commit

Permalink
xtc doc
Browse files Browse the repository at this point in the history
  • Loading branch information
grencez committed Dec 30, 2024
1 parent d457913 commit 4f63567
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions doc/setting/sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ We use an LLM to infer the next token via random sampling.
(presence_penalty 0.1)
)
; DRY (Don't Repeat Yourself) sampling.
; "Don't Repeat Yourself".
(dry
(window_length 1200)
(multiplier 0.8)
Expand All @@ -67,17 +67,25 @@ We use an LLM to infer the next token via random sampling.
(language
((infer_via sampling)
(adjust_thru (())
; Top-K Sampling. 1 makes sampling deterministic.
; Top-K. 1 makes sampling deterministic.
(top_k 40)
; Top-P Sampling. 0.0 is a no-op.
; Top-P. 0.0 is a no-op.
(top_p 0.9)
; Locally Typical Sampling cutoff. 1.0 is a no-op.
; Locally Typical cutoff. 1.0 is a no-op.
(typical_p 0.9)
; Min-P Sampling. 1.0 is a no-op.
; Min-P. 1.0 is a no-op.
; Cut out tokens whose probability is less
; than 5% relative to the most probable token.
(min_p 0.05)
; "Exclude Top Choices".
(xtc
; Probability threshold (default is 0.15).
(threshold 0.15)
; Probability of performing the exclusion on this pass (defult is 1.0).
(probability 0.5)
)
; Temperature is not as necessary when tokens are expcluded.
; It can be >1.0 when Min-P has already filtered out the nonsensical tokens.
(temperature 1.2)
Expand Down
4 changes: 2 additions & 2 deletions src/language/inference_schema.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct PenalizeWith {
};

struct Xtc {
float probability = 0.0f;
float threshold = 0.1f;
float threshold = 0.15f;
float probability = 1.0f;
};

struct AdjustViaKind {
Expand Down

0 comments on commit 4f63567

Please sign in to comment.