Skip to content

port t5 and clip to nnx.Module #21

@SauravMaheshkar

Description

@SauravMaheshkar

Currently, we load the t5 and clip models as torch modules and wrap their outputs as JAX arrays. This prevents OOM during inference (since we can use the .to() method); having a pure JAX inference pipeline would be ideal.

References

  1. Initialize Flax model params on CPU  huggingface/transformers#24711
  2. feat(flax): leave restored weights on CPU huggingface/transformers#15295

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions