Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -138,14 +138,11 @@ from qai_hub_models.models.whisper_small_en import WhisperEncoder,WhisperDecoder
|
|
138 |
|
139 |
# Load the model
|
140 |
encoder_model = WhisperEncoder.from_pretrained()
|
141 |
-
|
142 |
decoder_model = WhisperDecoder.from_pretrained()
|
143 |
|
144 |
-
|
145 |
# Device
|
146 |
device = hub.Device("Samsung Galaxy S23")
|
147 |
|
148 |
-
|
149 |
# Trace model
|
150 |
encoder_input_shape = encoder_model.get_input_spec()
|
151 |
encoder_sample_inputs = encoder_model.sample_inputs()
|
@@ -161,7 +158,6 @@ encoder_compile_job = hub.submit_compile_job(
|
|
161 |
|
162 |
# Get target model to run on-device
|
163 |
encoder_target_model = encoder_compile_job.get_target_model()
|
164 |
-
|
165 |
# Trace model
|
166 |
decoder_input_shape = decoder_model.get_input_spec()
|
167 |
decoder_sample_inputs = decoder_model.sample_inputs()
|
@@ -188,12 +184,10 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
188 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
189 |
provided job URL to view a variety of on-device performance metrics.
|
190 |
```python
|
191 |
-
|
192 |
encoder_profile_job = hub.submit_profile_job(
|
193 |
model=encoder_target_model,
|
194 |
device=device,
|
195 |
)
|
196 |
-
|
197 |
decoder_profile_job = hub.submit_profile_job(
|
198 |
model=decoder_target_model,
|
199 |
device=device,
|
|
|
138 |
|
139 |
# Load the model
|
140 |
encoder_model = WhisperEncoder.from_pretrained()
|
|
|
141 |
decoder_model = WhisperDecoder.from_pretrained()
|
142 |
|
|
|
143 |
# Device
|
144 |
device = hub.Device("Samsung Galaxy S23")
|
145 |
|
|
|
146 |
# Trace model
|
147 |
encoder_input_shape = encoder_model.get_input_spec()
|
148 |
encoder_sample_inputs = encoder_model.sample_inputs()
|
|
|
158 |
|
159 |
# Get target model to run on-device
|
160 |
encoder_target_model = encoder_compile_job.get_target_model()
|
|
|
161 |
# Trace model
|
162 |
decoder_input_shape = decoder_model.get_input_spec()
|
163 |
decoder_sample_inputs = decoder_model.sample_inputs()
|
|
|
184 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
185 |
provided job URL to view a variety of on-device performance metrics.
|
186 |
```python
|
|
|
187 |
encoder_profile_job = hub.submit_profile_job(
|
188 |
model=encoder_target_model,
|
189 |
device=device,
|
190 |
)
|
|
|
191 |
decoder_profile_job = hub.submit_profile_job(
|
192 |
model=decoder_target_model,
|
193 |
device=device,
|