Skip to content

Commit

Permalink
Update convert.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xenova committed Mar 18, 2024
1 parent d60515d commit 8f33ade
Showing 1 changed file with 23 additions and 96 deletions.
119 changes: 23 additions & 96 deletions scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,107 +27,34 @@


PER_CHANNEL_REDUCE_RANGE_MODELS = {

}

MODEL_SPECIFIC_QUANTIZE_PARAMS = {
# Decoder-only models
'codegen': {
'per_channel': False,
'reduce_range': False,
},
'gpt2': {
'per_channel': False,
'reduce_range': False,
},
'gpt_bigcode': {
'per_channel': False,
'reduce_range': False,
},
'gptj': {
'per_channel': False,
'reduce_range': False,
},
'gpt-neo': {
'per_channel': False,
'reduce_range': False,
},
'gpt-neox': {
'per_channel': False,
'reduce_range': False,
},
'mpt': {
'per_channel': False,
'reduce_range': False,
},
'bloom': {
'per_channel': False,
'reduce_range': False,
},
'llama': {
'per_channel': False,
'reduce_range': False,
},
'opt': {
'per_channel': False,
'reduce_range': False,
},
'mistral': {
'per_channel': False,
'reduce_range': False,
},
'falcon': {
'per_channel': False,
'reduce_range': False,
},
'phi': {
'per_channel': False,
'reduce_range': False,
},
'qwen2': {
'per_channel': False,
'reduce_range': False,
},
'stablelm': {
'per_channel': False,
'reduce_range': False,
},
'starcoder2': {
'per_channel': False,
'reduce_range': False,
},
'codegen',
'gpt2',
'gpt_bigcode',
'gptj',
'gpt-neo',
'gpt-neox',
'mpt',
'bloom',
'llama',
'opt',
'mistral',
'falcon',
'phi',
'qwen2',
'stablelm',
'starcoder2',

# Encoder-decoder models
'whisper': {
'per_channel': False,
'reduce_range': False,
},
'vision-encoder-decoder': {
'per_channel': False,
'reduce_range': False,
},
'whisper',
'vision-encoder-decoder',

# Encoder-only models
'owlv2': {
'per_channel': False,
'reduce_range': False,
},
'wavlm': {
'per_channel': False,
'reduce_range': False,
},
'wav2vec2': {
'per_channel': False,
'reduce_range': False,
},
'unispeech': {
'per_channel': False,
'reduce_range': False,
},
'unispeech-sat': {
'per_channel': False,
'reduce_range': False,
},
'owlv2',
'wavlm',
'wav2vec2',
'unispeech',
'unispeech-sat',
}

MODELS_WITHOUT_TOKENIZERS = [
Expand Down

0 comments on commit 8f33ade

Please sign in to comment.