ml-explore / mlx-examples

Examples in the MLX framework
MIT License
5.92k stars 838 forks source link

Why change the module decomposition of whisper #809

Closed m-a-sch closed 4 months ago

m-a-sch commented 4 months ago

Does MLX instead of torch really require to move away from the openAI module decomposition? Why?

awni commented 4 months ago

Could you explain what you mean by "module decomposition"?

m-a-sch commented 4 months ago

Probably not the right term. I mean this modules of course, the mlx classes and abstractions are not the same as the torch one, but the whisper abstractions should remain the same.

awni commented 4 months ago

I understand your question now. Some things (e.g. triton_ops) don't make sense for MLX. Other things (e.g. torch_whipser and load_models are there to facilitate the conversion). Otherwise it's mostly the same with some simplifications. We don't intend for it to be a 1:1 match in terms of API and code organization. It should produce the same results though given the same audio.