mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
OPT breakmodel
This commit is contained in:
6
utils.py
6
utils.py
@ -135,6 +135,12 @@ def decodenewlines(txt):
|
||||
return txt.replace("</s>", '\n')
|
||||
return txt
|
||||
|
||||
#==================================================================#
|
||||
# Returns number of layers given an HF model config
|
||||
#==================================================================#
|
||||
def num_layers(config):
|
||||
return config.num_layers if hasattr(config, "num_layers") else config.n_layer if hasattr(config, "n_layer") else config.num_hidden_layers
|
||||
|
||||
#==================================================================#
|
||||
# Downloads huggingface checkpoints using aria2c if possible
|
||||
#==================================================================#
|
||||
|
Reference in New Issue
Block a user