All models

canine

A tokenization-free Transformer that reads text character by character from raw Unicode.

Language · 484 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 (26 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
132.1M
Operations
484
Framework
PyTorch
Recurrent
No
Published
2021
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
m3747
Graph hash
308783f11a57154c30d781c20a1bb5a89e1853f7d42c3d4299fe9ed2f9c344f6
Skeleton hash
803c8c609c7274a362a4d531f643f2b7413fe86fa79be1658410e71979605c2b
Architecture hash
45e20c5caec584fb2293da7c887bec31f04ec4f8bd6c2ec5575c8a095539affe
Diagram SHA-256
5833226cfe8995bd4979124a6d975cb7d9a4af8dd5035b82bfdb553f270c3d8d
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.AutoModel.from_config()

What it is

CANINE is a tokenization-free Transformer. It skips the usual step of splitting text into subwords or wordpieces and processes text character by character. Because it works directly with raw Unicode, it is especially useful for languages with complex or inconsistent tokenization rules and for noisy inputs such as typos.

Working with characters means handling longer sequences. CANINE therefore compresses the input early on, a step called downsampling, so that the transformer does not have to process every character individually. It can be used with or without a tokenizer, though for batched inference and training the tokenizer is recommended to pad and truncate all sequences to the same length. CANINE is primarily designed to be fine-tuned on a downstream task, and the pretrained model can be used for either masked language modeling or next sentence prediction.

Key idea. CANINE is a Transformer that reads raw Unicode characters without a tokenization step and downsamples the input early so the transformer does not process every character individually.

  • canine
  • tokenization-free transformer
  • character-level transformer
  • character-level model
  • raw unicode text
  • text encoder
  • text embeddings
  • feature extraction

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