Taking Trainium3 to the Track: Generating Videos with LTX-2.5
Source
huggingface.co
Date
Why it matters
Shows a 10-second clip with sound generated in about 22 s on half a Trainium3 machine, giving a data point for non-CUDA video InferenceUsing a trained model to produce an output from a supplied input.Full definition → cost and feasibility.
Key takeaways · AI-distilled
Hugging Face's first working LTX-2.5 run on Trainium3 took about 5 min 20 s per 10-second clip, with the NeuronCores busy for only about 45 s. After five days of fixes, a 2048x1024 clip took 22 to 23 s on 32 of the machine's 64 cores.
Most end-to-end time was lost on the HostThe computer on which a process runs.Full definition →, not the device: running the pipeline on rank 0 only cut prompt encoding from about 205 s to 7.5 s, and decoding video on the NeuronCores cut 2048x1024 decode from 357 s to 1.6 s.
Tensor parallelism was forced by memory and capped by the transformerThe neural network architecture behind modern AI models, built on attention — letting every word directly consider every other word in parallel.Full definition →'s 32 attentionThe mechanism that lets a model weigh which earlier words matter for the word it's currently processing — the core operation of a transformer.Full definition → heads. Splitting video tokens 8 more ways (sequence parallelism) shrank each core's graph enough to load at 2048x1024 and put 32 cores on one clip.
On Trainium, graph shape decided speed: attention only used the fast kernel when sequence length was a multiple of 128 tokens. Checking each model split against CPU first exposed a torch-neuronx bf16 GELU accuracy issue, fixed by computing GELU in fp32.
Prompts alone did not keep a subject consistent across shots, so the author chained shots by starting or ending on another shot's frames. The model still got details wrong often enough that the author made 4 takes of each new shot and picked one.
Terms in this piece · Glossary
Inference — Using a trained model to produce an output from a supplied input.
transformer — The neural network architecture behind modern AI models, built on attention — letting every word directly consider every other word in parallel.
attention — The mechanism that lets a model weigh which earlier words matter for the word it's currently processing — the core operation of a transformer.