Feature: fp16 builds for timesfm (3x to 12x faster than fp32) need an overflow guard for large normalized inputs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 46/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python, pytorch, tensorflow
- Área
- machine-learning, performance
Línea de trabajo
Start with the TimesFM family build and network builder paths, then read families/timesfm/README.md and the FP8 study referenced in the issue. Trace where normalized inputs enter the input residual block and how precision is selected; the issue does not name specific source files or tests. Done means fp16 builds pass an overflow guard, all 200 sampled M4 daily series produce finite forecasts, and an fp16 end-to-end case covers the behavior while fp32 remains the default.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Request type: Improvement to existing behavior
Problem and use case
families/timesfm builds fp32 only (the family build rejects fp16, although the network builder has an fp16 path). fp32 with TF32 off is slow: on google/timesfm-2.0-500m-pytorch an fp16 engine is 3.2x to 3.5x faster at batch 1 and 11.5x to 12.4x faster at batch 32 (B200 / B300, TensorRT 11.4), with M4 hourly MASE 0.5859 against 0.5866 for fp32.
fp16 cannot simply be turned on: on 1 of 200 sampled M4 daily series the fp16 engine (the builder's fp16 path) returns non-finite forecasts. That series' input to the input residual block reaches 1.53e9 and its residual stream 8.96e8, past the fp16 maximum (65504) from layer 0 on. The fp32 engine and Hugging Face fp32 are finite on all 200 series. For comparison, the median per-series maximum on M4 daily is 32.4 (input) and 138 (residual); on M4 hourly the maximum over all series is 66.2 and 173. TimesFM normalizes each series by the mean and standard deviation of its first unpadded patch, so a nearly flat start can give very large normalized values (likely cause, not verified per series). fp32_layers cannot fix it, because the residual stream of every layer is out of range.
Proposed outcome
Accept precision=fp16 for timesfm with an overflow guard, for example scaling or clamping the normalized input before the input residual block (or keeping the input block and residual stream in fp32), so that all M4 series stay finite, with its own fp16 E2E case. fp32 stays the default.
Model and target details
google/timesfm-2.0-500m-pytorch @ dc2443792ce5516872b89b37cf1bc058c3bf0c10 (the family manifest model); TensorRT 11.4; B200 / B300.
| fp32 (default) | fp16 (builder path) | |
|---|---|---|
| Time, batch 1, B200 / B300 | 6.94 / 6.64 ms | 1.96 / 2.11 ms |
| Time, batch 32, B200 / B300 | 51.45 / 45.91 ms | 4.17 / 3.98 ms |
| Plan size (B200) | 1906 MiB | 956 MiB |
| M4 hourly MASE (HF fp32 0.5866) | 0.5866 | 0.5859 |
| M4 daily series with non-finite forecast (of 200) | 0 | 1 |
Alternatives considered
fp32_layers (does not help: every layer is out of range on that series). FP8 (measured in #2005, not shipped; it runs on fp16 activations and has the same non-finite series).
Additional context
Found during the FP8 study recorded in families/timesfm/README.md (#2005, "fp16 overflow found on the way").
- Lenguaje dominante
- Python
- Estrellas
- 288
- Forks
- 73
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 273
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/TensorRT-Model-Connect
-
Docs: ITrtModule::forward() output-buffer lifetime and dtype contract are undocumentedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/TensorRT-Model-Connect#1126 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NVIDIA/TensorRT-Model-Connect#2060 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NVIDIA/TensorRT-Model-Connect#2054 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
NVIDIA/TensorRT-Model-Connect#2053 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
NVIDIA/TensorRT-Model-Connect#2049 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/TensorRT-Model-Connect
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
NVIDIA/auto-ontology#463 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
NousResearch/hermes-agent#151165 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
code-health
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
tinaudio/synth-setter#3750 ·
Los mantenedores suelen responder en 1 día
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentPosiblemente ocupada @Bevisy la tomó hoy. Abiertoneeds-acceptance wg/developer-experience-ecosystem
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
vllm-project/semantic-router#5996 ·
Los mantenedores suelen responder en 2 días