Upload UltravoxPipeline
Browse files- model.safetensors +3 -0
- ultravox_config.py +3 -0
- ultravox_model.py +1 -3
- ultravox_pipeline.py +1 -2
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7dac54d53df3d158e6024aec3d59c3ded602e25492c210c276be98e8ec71e39
|
3 |
+
size 117473752
|
ultravox_config.py
CHANGED
@@ -139,3 +139,6 @@ class UltravoxConfig(transformers.PretrainedConfig):
|
|
139 |
self.initializer_range = self.text_config.initializer_range
|
140 |
|
141 |
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
139 |
self.initializer_range = self.text_config.initializer_range
|
140 |
|
141 |
super().__init__(**kwargs)
|
142 |
+
|
143 |
+
|
144 |
+
UltravoxConfig.register_for_auto_class()
|
ultravox_model.py
CHANGED
@@ -397,8 +397,6 @@ class UltravoxProjector(nn.Sequential):
|
|
397 |
return hidden_states
|
398 |
|
399 |
|
400 |
-
|
401 |
-
ultravox_config.UltravoxConfig, UltravoxModel
|
402 |
-
)
|
403 |
|
404 |
transformers.activations.ACT2FN["swiglu"] = SwiGLU
|
|
|
397 |
return hidden_states
|
398 |
|
399 |
|
400 |
+
UltravoxModel.register_for_auto_class("AutoModelForCausalLM")
|
|
|
|
|
401 |
|
402 |
transformers.activations.ACT2FN["swiglu"] = SwiGLU
|
ultravox_pipeline.py
CHANGED
@@ -101,9 +101,8 @@ class UltravoxPipeline(transformers.Pipeline):
|
|
101 |
return output_text
|
102 |
|
103 |
|
104 |
-
transformers.pipeline
|
105 |
transformers.pipelines.PIPELINE_REGISTRY.register_pipeline(
|
106 |
-
"ultravox-pipeline",
|
107 |
pipeline_class=UltravoxPipeline,
|
108 |
pt_model=ultravox_model.UltravoxModel,
|
109 |
default={"pt": ("fixie-ai/ultravox-v0.2", "main")},
|
|
|
101 |
return output_text
|
102 |
|
103 |
|
|
|
104 |
transformers.pipelines.PIPELINE_REGISTRY.register_pipeline(
|
105 |
+
"ultravox-pipeline",
|
106 |
pipeline_class=UltravoxPipeline,
|
107 |
pt_model=ultravox_model.UltravoxModel,
|
108 |
default={"pt": ("fixie-ai/ultravox-v0.2", "main")},
|