Read more metadata (config.json & quantize_config.json)
This commit is contained in:
parent
56b5a4af74
commit
96da2e1c0d
3 changed files with 59 additions and 67 deletions
|
@ -258,9 +258,10 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur
|
|||
|
||||
|
||||
def update_truncation_length(current_length, state):
|
||||
if state['loader'].lower().startswith('exllama'):
|
||||
return state['max_seq_len']
|
||||
elif state['loader'] in ['llama.cpp', 'llamacpp_HF', 'ctransformers']:
|
||||
return state['n_ctx']
|
||||
else:
|
||||
return current_length
|
||||
if 'loader' in state:
|
||||
if state['loader'].lower().startswith('exllama'):
|
||||
return state['max_seq_len']
|
||||
elif state['loader'] in ['llama.cpp', 'llamacpp_HF', 'ctransformers']:
|
||||
return state['n_ctx']
|
||||
|
||||
return current_length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue