Skip to content

Commit

Permalink
Add missing exllamav2 samplers
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Nov 16, 2023
1 parent cd41f89 commit 58c6001
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/exllamav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ def generate_with_streaming(self, prompt, state):
settings.temperature = state['temperature']
settings.top_k = state['top_k']
settings.top_p = state['top_p']
settings.min_p = state['min_p']
settings.tfs = state['tfs']
settings.typical = state['typical_p']
settings.mirostat = state['mirostat_mode'] == 2
settings.mirostat_tau = state['mirostat_tau']
settings.mirostat_eta = state['mirostat_eta']
settings.token_repetition_penalty = state['repetition_penalty']
settings.token_repetition_range = -1 if state['repetition_penalty_range'] <= 0 else state['repetition_penalty_range']
if state['ban_eos_token']:
Expand Down
5 changes: 5 additions & 0 deletions modules/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,16 @@
'ExLlamav2': {
'temperature',
'top_p',
'min_p',
'top_k',
'typical_p',
'tfs',
'repetition_penalty',
'repetition_penalty_range',
'seed',
'mirostat_mode',
'mirostat_tau',
'mirostat_eta',
'ban_eos_token',
'add_bos_token',
'custom_token_bans',
Expand Down

0 comments on commit 58c6001

Please sign in to comment.