AI SeedbankHelp preserve open and free AI for humanity's future

← All models

google_canine-c

google · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


language:

  • multilingual
  • af
  • sq
  • ar
  • an
  • hy
  • ast
  • az
  • ba
  • eu
  • bar
  • be
  • bn
  • inc
  • bs
  • br
  • bg
  • my
  • ca
  • ceb
  • ce
  • zh
  • cv
  • hr
  • cs
  • da
  • nl
  • en
  • et
  • fi
  • fr
  • gl
  • ka
  • de
  • el
  • gu
  • ht
  • he
  • hi
  • hu
  • is
  • io
  • id
  • ga
  • it
  • ja
  • jv
  • kn
  • kk
  • ky
  • ko
  • la
  • lv
  • lt
  • roa
  • nds
  • lm
  • mk
  • mg
  • ms
  • ml
  • mr
  • mn
  • min
  • ne
  • new
  • nb
  • nn
  • oc
  • fa
  • pms
  • pl
  • pt
  • pa
  • ro
  • ru
  • sco
  • sr
  • hr
  • scn
  • sk
  • sl
  • aze
  • es
  • su
  • sw
  • sv
  • tl
  • tg
  • th
  • ta
  • tt
  • te
  • tr
  • uk
  • ud
  • uz
  • vi
  • vo
  • war
  • cy
  • fry
  • pnb
  • yo license: apache-2.0 datasets:
  • bookcorpus
  • wikipedia

CANINE-c (CANINE pre-trained with autoregressive character loss)

Pretrained CANINE model on 104 languages using a masked language modeling (MLM) objective. It was introduced in the paper CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation and first released in this repository.

What's special about CANINE is that it doesn't require an explicit tokenizer (such as WordPiece or SentencePiece) as other models like BERT and RoBERTa. Instead, it directly operates at a character level: each character is turned into its Unicode code point.

This means that input processing is trivial and can typically be accomplished as:

input_ids = [ord(char) for char in text]

The ord() function is part of Python, and turns each character into its Unicode code point.

Disclaimer: The team releasing CANINE did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

CANINE is a transformers model pretrained on a large corpus of multilingual data in a self-supervised fashion, similar to BERT. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was pretrained with two objectives:

  • Masked language modeling (MLM): one randomly masks part of the inputs, which the model needs to predict. This model (CANINE-c) is trained with an autoregressive character loss. One masks several character spans within each sequence, which the model then autoregressively predicts.
  • Next sentence prediction (NSP): the model concatenates two sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not.

This way, the model learns an inner representation of multiple languages that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the CANINE model as inputs.

Intended uses & limitations

You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the model hub to look for fine-tuned versions on a task that interests you.

Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at models like GPT2.

How to use

Here is how to use this model:

from transformers import CanineTokenizer, CanineModel

model = CanineModel.from_pretrained('google/canine-c')
tokenizer = CanineTokenizer.from_pretrained('google/canine-c')

inputs = ["Life is like a box of chocolates.", "You never know what you gonna get."]
encoding = tokenizer(inputs, padding="longest", truncation=True, return_tensors="pt")

outputs = model(**encoding) # forward pass
pooled_output = outputs.pooler_output
sequence_output = outputs.last_hidden_state

Training data

The CANINE model was pretrained on on the multilingual Wikipedia data of mBERT, which includes 104 languages.

BibTeX entry and citation info

@article{DBLP:journals/corr/abs-2103-06874,
  author    = {Jonathan H. Clark and
               Dan Garrette and
               Iulia Turc and
               John Wieting},
  title     = {{CANINE:} Pre-training an Efficient Tokenization-Free Encoder for
               Language Representation},
  journal   = {CoRR},
  volume    = {abs/2103.06874},
  year      = {2021},
  url       = {https://arxiv.org/abs/2103.06874},
  archivePrefix = {arXiv},
  eprint    = {2103.06874},
  timestamp = {Tue, 16 Mar 2021 11:26:59 +0100},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2103-06874.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:8929b87c8104c406998a53b5ed6e42b249d4632c&dn=google_canine-c

Open magnet in torrent client · infohash 8929b87c8104c406998a53b5ed6e42b249d4632c

Files & hashes

PathSizesha1sha256
README.md5.1 KB (5,179 B)46e46be8e5b61ca66d69adda8a836e095b2d2a4dded11c8c006020a124d4c5c7f113c52da078511f7fdfe54d01b38cd9aac9c8c5
config.json698 B (698 B)636aa1d3a880e59270e7192adb6fc05ba7b864a55a5726fe7fa597c32818094d3daf0614768f25828aef3f903796865b85f00684
model.safetensors504.0 MB (528,491,046 B)6227f49b36df74aab945be0857b58701baa7ca7e0793a42e366a9ad1fac273f0e79b5ccb38bf5ca102be63c28fee56553200b7b2
pytorch_model.bin504.1 MB (528,561,767 B)c03d7507a209c3d88357871fb2c24206b82384e2e83c29bdbaf959bde77d66c334ea077e9f980a6e6973197230c3bbb90f924470
special_tokens_map.json657 B (657 B)8915986dd6d80b9053a209f7b6763066b41fa8ae63ade5ba36d52c1243ecf9f93e44cd8831595f076556c78982db89268e875a81
tokenizer_config.json892 B (892 B)089e4e983af7e19c8c6430b7b2ef381b1c0776bc2ed2c5b2b84377da9c6e1e3afdc36338e60809aee753a5985bfed93bac64b4c9

Cite this release

Canonical URL
https://aiseedbank.org/models/google_canine-c/
Slug
google_canine-c
Infohash
8929b87c8104c406998a53b5ed6e42b249d4632c
License
apache-2.0
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: google_canine-c.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositorygoogle/canine-c
Revision (pinned)dc0eaffdff3fa9161613311c7096eeb3e133ee19
Fetched at2026-09-03T23:10:05Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-03T23:10:17Z

apache-2.01008.1 MB (1,057,060,239 bytes)transformerspytorchsafetensorscaninefeature-extractionmultilingualastbarinccebroandsminnewpmsscoscnazewarfrypnbendpoints_compatible87 languages (af, sq, ar …)paper: 2103.06874