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.
| Family | What it's for |
|---|---|
| MLP | Tabular data and small problems. |
| CNN | Images and signals with local structure. |
| RNN, LSTM, GRU | Sequences and time series. |
| VAE | Compressed representations and generation. |
| GAN | Generation with a generator and a discriminator. |
| Diffusion | Generation by removing noise. |
| ViT | Images with attention (vision transformer). |
| Transformer encoder / decoder | Text and long sequences. |
The design is saved in architecture/architecture.yaml, versioned with the project. For example, a small CNN for
32×32 images:
# 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:
| Type | Note |
|---|---|
bpe | Classic byte-pair encoding. |
byte-bpe | BPE over bytes: there are never unknown tokens. |
wordpiece | The BERT style. |
unigram | Probabilistic 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:
tokenizers/
└── soporte-es/
├── v1/ tokenizer.json sha256:…
└── v2/ tokenizer.json sha256:…GPU diagnostics
GPU diagnostics detects which accelerators Python can use on your computer:
| Backend | Hardware |
|---|---|
| CUDA | NVIDIA GPU. |
| ROCm | AMD GPU (Linux). |
| DirectML | GPU on Windows (DirectX 12). |
| MPS | Apple Silicon (macOS). |
| Intel XPU | Intel 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:
| Part | What it counts |
|---|---|
| Weights | The model's parameters. |
| Gradients | One per trainable parameter. |
| Optimizer | The state of Adam and similar optimizers. |
| Activations | What 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.
# in the training configuration
training:
distributed:
mode: ddp
devices: auto # or a number of GPUsOnly 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: remoteindicates that the project prefers to train elsewhere.
See ML privacy and sandbox and Containers and remote development.