You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What dependency or runtime approach should multilang-support use so that the service can run reliably on CPU without requiring CUDA or an NVIDIA GPU?
Determine whether the existing MarianMT / Hugging Face transformers implementation can reasonably be made CPU-only, or whether a different translation dependency is needed.
Decision or next step this enables
The result will determine the CPU-compatible translation approach to implement for multilang-support.
Any required production changes should be captured as separate implementation work after an approach is selected.
Current understanding and key unknowns
Confirmed:
multilang-support currently provides English-to-French translation using Helsinki-NLP/opus-mt-en-fr through Hugging Face transformers.
The service currently depends on PyTorch.
Its Docker image currently uses a CUDA-enabled PyTorch base image.
docker-compose.yml currently reserves an NVIDIA GPU for the service.
The current device-selection code uses CUDA when GPUs are available, but does not currently establish a working CPU fallback when no GPU is present.
Whether the existing MarianMT / transformers stack can be made reliably CPU-only with appropriate runtime dependencies and device handling.
If not, which CPU-compatible translation dependency would best fit the existing service.
Whether CPU translation performance is reasonable for typical IMAGE requests.
Investigation plan
Proposed investigation approach
Review the current model, dependencies, container configuration, and device-selection logic.
Prototype/fix the existing CPU execution path sufficiently to determine whether the current MarianMT / transformers stack is viable without GPU support.
If the existing stack is not suitable, identify and compare viable CPU-compatible alternatives.
Run a minimal proof of concept of the most promising approach without CUDA or an NVIDIA runtime.
Verify English-to-French translation through the existing /service/translate interface.
Record relevant performance and resource observations.
Recommend an approach and identify any follow-up implementation work.
Primary output
Written findings and recommendation
Completion criteria
The current sources of the GPU/CUDA requirement are identified.
The existing MarianMT / transformers stack has been evaluated as a CPU-only option.
Alternative dependencies are compared if the existing stack is unsuitable.
At least one viable approach is demonstrated without CUDA or an NVIDIA GPU.
English-to-French translation works through the existing service interface.
Relevant performance and resource trade-offs are documented.
A recommended approach and rationale are recorded.
Any resulting implementation work is captured separately.
Additional context
Constraints and boundaries
The selected approach must not require CUDA or an NVIDIA GPU.
Preserve the existing English-to-French translation functionality.
Preserve the existing /service/translate interface unless the Investigation identifies a compelling reason not to.
Do not expand this Investigation into adding additional languages.
Production implementation is outside the scope of this Investigation.
Investigation definition
Question to answer
What dependency or runtime approach should
multilang-supportuse so that the service can run reliably on CPU without requiring CUDA or an NVIDIA GPU?Determine whether the existing MarianMT / Hugging Face
transformersimplementation can reasonably be made CPU-only, or whether a different translation dependency is needed.Decision or next step this enables
The result will determine the CPU-compatible translation approach to implement for
multilang-support.Any required production changes should be captured as separate implementation work after an approach is selected.
Current understanding and key unknowns
Confirmed:
multilang-supportcurrently provides English-to-French translation usingHelsinki-NLP/opus-mt-en-frthrough Hugging Facetransformers.docker-compose.ymlcurrently reserves an NVIDIA GPU for the service.addressed the immediate RTX 5090 / CUDA compatibility problem while intentionally retaining GPU execution for
multilang-support.Key unknowns:
transformersstack can be made reliably CPU-only with appropriate runtime dependencies and device handling.Investigation plan
Proposed investigation approach
/service/translateinterface.Primary output
Written findings and recommendation
Completion criteria
transformersstack has been evaluated as a CPU-only option.Additional context
Constraints and boundaries
/service/translateinterface unless the Investigation identifies a compelling reason not to.Evidence, prior work, and related issues
Primary code to review:
services/multilang-support/Dockerfilecurrent CUDA/PyTorch container and model installation.services/multilang-support/requirements.txtcurrent Python dependencies.services/multilang-support/src/utils.pymodel loading, device selection, and translation.services/multilang-support/src/translate.pyservice API and translation endpoint.docker-compose.ymlcurrent NVIDIA GPU reservation formultilang-support..github/workflows/multilang-translate.ymlcurrent build workflow.Existing consumers of the translation service:
handlers/high-charts/src/utils.tshandlers/photo-audio-handler/src/utils.tshandlers/autour-handler/src/server.tsRelated work:
production failures after the Pegasus GPU was upgraded to an RTX 5090.
updated CUDA compatibility while retaining GPU execution for
multilang-support.implemented the immediate CUDA 12.8 / production configuration changes.
previous update of the PyTorch / CUDA / Transformers implementation.