farzadab commited on
Commit
28e57a7
·
verified ·
1 Parent(s): 54d9df4

Upload UltravoxPipeline

Browse files
Files changed (2) hide show
  1. config.json +23 -3
  2. ultravox_model.py +5 -0
config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "architectures": [
3
- "ultravox_model.UltravoxModel"
4
  ],
5
  "audio_config": {
6
  "_name_or_path": "facebook/wav2vec2-base-960h",
@@ -14,10 +14,20 @@
14
  "model_type": "wav2vec2"
15
  },
16
  "audio_model_id": "facebook/wav2vec2-base-960h",
 
 
 
 
 
 
 
 
 
 
17
  "audio_token_index": 32000,
18
  "auto_map": {
19
  "AutoConfig": "ultravox_config.UltravoxConfig",
20
- "AutoModel": "ultravox_model.UltravoxModel"
21
  },
22
  "custom_pipelines": {
23
  "ultravox-pipeline": {
@@ -31,7 +41,7 @@
31
  },
32
  "impl": "ultravox_pipeline.UltravoxPipeline",
33
  "pt": [
34
- "ultravox_model.UltravoxModel"
35
  ],
36
  "tf": [],
37
  "type": "multimodal"
@@ -58,6 +68,16 @@
58
  "torch_dtype": "bfloat16"
59
  },
60
  "text_model_id": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
 
 
 
 
 
 
 
 
 
 
61
  "torch_dtype": "float32",
62
  "transformers_version": "4.41.2",
63
  "vocab_size": 32000
 
1
  {
2
  "architectures": [
3
+ "UltravoxModel"
4
  ],
5
  "audio_config": {
6
  "_name_or_path": "facebook/wav2vec2-base-960h",
 
14
  "model_type": "wav2vec2"
15
  },
16
  "audio_model_id": "facebook/wav2vec2-base-960h",
17
+ "audio_model_lora_config": {
18
+ "lora_alpha": 8,
19
+ "r": 0,
20
+ "target_modules": [
21
+ "k_proj",
22
+ "q_proj",
23
+ "linear_k",
24
+ "linear_q"
25
+ ]
26
+ },
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": {
 
41
  },
42
  "impl": "ultravox_pipeline.UltravoxPipeline",
43
  "pt": [
44
+ "UltravoxModel"
45
  ],
46
  "tf": [],
47
  "type": "multimodal"
 
68
  "torch_dtype": "bfloat16"
69
  },
70
  "text_model_id": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
71
+ "text_model_lora_config": {
72
+ "lora_alpha": 8,
73
+ "r": 0,
74
+ "target_modules": [
75
+ "k_proj",
76
+ "q_proj",
77
+ "linear_k",
78
+ "linear_q"
79
+ ]
80
+ },
81
  "torch_dtype": "float32",
82
  "transformers_version": "4.41.2",
83
  "vocab_size": 32000
ultravox_model.py CHANGED
@@ -397,6 +397,11 @@ class UltravoxProjector(nn.Sequential):
397
  return hidden_states
398
 
399
 
 
400
  UltravoxModel.register_for_auto_class("AutoModelForCausalLM")
 
 
 
 
401
 
402
  transformers.activations.ACT2FN["swiglu"] = SwiGLU
 
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