Documentation / ML Studio

Deep learning and GPU

Design neural networks layer by layer, train tokenizers, diagnose your GPU, estimate resources, and use DDP with several GPUs and remote machines.

On this page

For most tabular problems you don't need a GPU: they train in seconds or minutes on an ordinary CPU. This page is for when the model grows: neural networks, vision, audio, text and language models.

Architecture designer

The Architecture designer builds neural networks without writing the training loop. The workshop (“Workshop · name”) shows the Network layers; press Add layer to add one and adjust the Learning rate and the Batch size.

FamilyWhat it's for
MLPTabular data and small problems.
CNNImages and signals with local structure.
RNN, LSTM, GRUSequences and time series.
VAECompressed representations and generation.
GANGeneration with a generator and a discriminator.
DiffusionGeneration by removing noise.
ViTImages with attention (vision transformer).
Transformer encoder / decoderText and long sequences.

The design is saved in architecture/architecture.yaml, versioned with the project. For example, a small CNN for 32×32 images:

yaml
# architecture/architecture.yaml
kind: cnn
inputs: { shape: [3, 32, 32] }
outputs: { classes: 10 }
components:
  - { id: c1, type: conv2d, filters: 32, pool: max2 }
  - { id: c2, type: conv2d, filters: 64, pool: max2 }
  - { id: flat, type: flatten }
  - { id: h1, type: dense, units: 128, dropout: 0.2 }
  - { id: out, type: head, kind: classification }

Besides general networks, ML Studio covers images (classification and detection), audio (classification and speech-to-text), video, graphs (GCN, GAT, GraphSAGE), reinforcement learning (DQN, PPO, REINFORCE), bandits and recommenders (ALS, BPR).

Tokenizers

For your own text models you can train a tokenizer on the project's texts:

TypeNote
bpeClassic byte-pair encoding.
byte-bpeBPE over bytes: there are never unknown tokens.
wordpieceThe BERT style.
unigramProbabilistic subword model.

Validate measures the unknown-token rate (unk), the tokens per word and the round-trip (encoding and decoding returns the same text). Each tokenizer is versioned with its sha256:

text
tokenizers/
└── soporte-es/
    ├── v1/   tokenizer.json  sha256:…
    └── v2/   tokenizer.json  sha256:…

GPU diagnostics

GPU diagnostics detects which accelerators Python can use on your computer:

BackendHardware
CUDANVIDIA GPU.
ROCmAMD GPU (Linux).
DirectMLGPU on Windows (DirectX 12).
MPSApple Silicon (macOS).
Intel XPUIntel GPU.

Test CPU vs GPU runs a short test and tells you, for example, “The GPU is ×8 faster than the CPU”. If the difference is small for your model, the CPU is enough.

In Monitoring › Resources you see CPU, RAM, GPU and free disk space live. Allow agents to train (2 h) gives agents permission to launch training runs for the next two hours.

Estimated resources

Before training, the plan estimates the memory and time needed:

PartWhat it counts
WeightsThe model's parameters.
GradientsOne per trainable parameter.
OptimizerThe state of Adam and similar optimizers.
ActivationsWhat is kept at each step for backpropagation; it grows with the batch size.

When it finishes, it compares estimated vs actual. If a job doesn't fit, the plan tells you before it starts and suggests options: a smaller batch, lower precision or QLoRA for language models. While it waits, the job stays queued with “Waiting for VRAM: needs X, Y available”.

Several GPUs: DDP

With two or more CUDA GPUs on the same machine, Yuli can train with data parallelism using DDP (DistributedDataParallel): each GPU processes its share of every epoch and the gradients are combined.

yaml
# in the training configuration
training:
  distributed:
    mode: ddp
    devices: auto     # or a number of GPUs

Only DDP with 2 or more CUDA GPUs is supported. If it isn't possible (a single GPU, no torch.distributed), training continues in a single process and says so in the metrics. Tensor or pipeline parallelism is not available.

Remote machines

If your computer isn't enough, you can train on a remote machine over SSH or in the cloud. Before launching, Yuli shows an egress warning:

“Data leaves for host: the dataset and the code the job reads are uploaded. When it finishes, Yuli brings back the model, verifies every file and deletes the data there (unless the machine keeps it).”

  • Nothing leaves without your confirmation.
  • You can set a spending cap for cloud machines.
  • In yuli-ml.yaml, hardware.prefer: remote indicates that the project prefers to train elsewhere.

See ML privacy and sandbox and Containers and remote development.