All models

xglm

A multilingual autoregressive language model trained on a corpus balanced across languages.

Language · 1,057 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (54 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
564.5M
Operations
1,057
Framework
PyTorch
Recurrent
No
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11305
Graph hash
0c51feb47a6edc81342649532923fb55ef86d68299ca60da197316ab53b985f6
Skeleton hash
a060caec6d4c23dd8f52d898aba4f699dce1c70ce4566c20a0adb9a34b32c927
Architecture hash
fc899ca8e2e3dcee3330b7732305ea505d11682c8168d8679061d4533575d1a3
Diagram SHA-256
77279abecb80fc0183feeff045e4df50796740aad150ed9a9e8816b183c842da
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCausalLM.from_config()

What it is

XGLM is a multilingual autoregressive language model, proposed in the paper Few-shot Learning with Multilingual Language Models. The paper starts from an observation about large autoregressive models such as GPT-3: they can represent many languages jointly, but their training data is dominated by English, which may limit how well they generalize across languages. The authors instead train on a balanced corpus covering a diverse set of languages and study few- and zero-shot learning on a wide range of tasks.

The paper reports that its largest model, with 7.5 billion parameters, outperformed GPT-3 of comparable size on multilingual commonsense reasoning and natural language inference. On the FLORES-101 machine translation benchmark it reports outperforming GPT-3 on 171 out of 182 translation directions with 32 training examples. It also names weak points: surface form robustness, and adaptation to tasks that do not have a natural cloze form.

Key idea. The paper trains multilingual autoregressive language models on a balanced corpus covering a diverse set of languages and studies their few- and zero-shot learning.

  • xglm
  • few-shot learning with multilingual language models
  • multilingual language model
  • multilingual autoregressive language model
  • cross-lingual few-shot learning
  • zero-shot learning
  • causal language modeling

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.