farzadab commited on
Commit
42bd947
·
verified ·
1 Parent(s): 28e57a7

Upload UltravoxPipeline

Browse files
Files changed (2) hide show
  1. config.json +1 -1
  2. ultravox_model.py +6 -4
config.json CHANGED
@@ -27,7 +27,7 @@
27
  "audio_token_index": 32000,
28
  "auto_map": {
29
  "AutoConfig": "ultravox_config.UltravoxConfig",
30
- "AutoModelForCausalLM": "ultravox_model.UltravoxModel"
31
  },
32
  "custom_pipelines": {
33
  "ultravox-pipeline": {
 
27
  "audio_token_index": 32000,
28
  "auto_map": {
29
  "AutoConfig": "ultravox_config.UltravoxConfig",
30
+ "AutoModel": "ultravox_model.UltravoxModel"
31
  },
32
  "custom_pipelines": {
33
  "ultravox-pipeline": {
ultravox_model.py CHANGED
@@ -397,11 +397,13 @@ class UltravoxProjector(nn.Sequential):
397
  return hidden_states
398
 
399
 
 
 
 
 
 
400
  UltravoxModel.register_for_auto_class()
401
- UltravoxModel.register_for_auto_class("AutoModelForCausalLM")
402
- transformers.AutoModelForCausalLM.register(
403
- ultravox_config.UltravoxConfig, UltravoxModel
404
- )
405
 
406
 
407
  transformers.activations.ACT2FN["swiglu"] = SwiGLU
 
397
  return hidden_states
398
 
399
 
400
+ transformers.AutoConfig.register("ultravox", ultravox_config.UltravoxConfig)
401
+ transformers.AutoModel.register(ultravox_config.UltravoxConfig, UltravoxModel)
402
+ # transformers.AutoModelForCausalLM.register(
403
+ # ultravox_config.UltravoxConfig, UltravoxModel
404
+ # )
405
  UltravoxModel.register_for_auto_class()
406
+ # UltravoxModel.register_for_auto_class("AutoModelForCausalLM")
 
 
 
407
 
408
 
409
  transformers.activations.ACT2FN["swiglu"] = SwiGLU