From: google <huggingface.co/google>Newsgroups: alt.freeweights.visionSubject:

canine-c

Date: 2026-11-14Commit: dc0eaffSigned: 2DC28CC7B26A283B ✓

Feature extraction model with 132M parameters. Safetensors weights, 1.06 GB in all. Published by google under Apache-2.0.

132M params1.06GBcanine-csafetensorspermissive
FactsParams132MSize1.06 GBFormatssafetensorsTaskfeature extractionLicenseApache-2.0From sourcepermissive
$ fw get google/canine-c
# manifest sha256 ed6e92e2b1a3… · 1.06 GB · 7 files
$ fw verify ./canine-c google/canine-c
From sourceHosted (signed)google/canine-cLast check: 2026-11-14 21:36 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Overview

Size
1.06 GB
Weights
528 MB (safetensors)
Parameters
132M
Formats
safetensors
Task
feature extraction
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
google
Added
2026-11-14
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:36 UTCpassed

Model card

From the publisher at commit dc0eaff. Shown as plain text with links; images open at the publisher.

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}
}

Files

7 files · 1.06 GBWeights 528 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes744 Bf888dc7c230287cd68af7034aa9fc2e2d6663fb7b3e70faa153caf93877914c3
README.md5.18 KBded11c8c006020a124d4c5c7f113c52da078511f7fdfe54d01b38cd9aac9c8c5
config.json698 B5a5726fe7fa597c32818094d3daf0614768f25828aef3f903796865b85f00684
model.safetensors528 MB0793a42e366a9ad1fac273f0e79b5ccb38bf5ca102be63c28fee56553200b7b2
pytorch_model.bin529 MBe83c29bdbaf959bde77d66c334ea077e9f980a6e6973197230c3bbb90f924470
special_tokens_map.json657 B63ade5ba36d52c1243ecf9f93e44cd8831595f076556c78982db89268e875a81
tokenizer_config.json892 B2ed2c5b2b84377da9c6e1e3afdc36338e60809aee753a5985bfed93bac64b4c9
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
dc0eaffdff pinned now manifest updated, same commit2026-11-14 21:36 UTC7 files · 1.06 GB
dc0eaffdff2026-11-14 21:36 UTC7 files · 1.06 GB

Use it

$ fw get google/canine-c
# manifest sha256 ed6e92e2b1a3… · 1.06 GB · 7 files
$ fw verify ./canine-c google/canine-c
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/google/canine-c.json --dir ./canine-c $ python3 fw.py verify ./canine-c ./google__canine-c.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/canine-c --revision dc0eaffdff3fa9161613311c7096eeb3e133ee19 --local-dir ./canine-c
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("google/canine-c", revision="dc0eaffdff3fa9161613311c7096eeb3e133ee19") model = AutoModel.from_pretrained("google/canine-c", revision="dc0eaffdff3fa9161613311c7096eeb3e133ee19", device_map="auto")

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
ded11c8c006020a124d4c5c7f113c52da078511f7fdfe54d01b38cd9aac9c8c5
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: google <huggingface.co/google>Newsgroups: alt.freeweights.visionSubject: canine-cDate: 2026-11-14Commit: dc0eaffSigned: 2DC28CC7B26A283B ✓
Upstream
google/canine-c
Pinned commit
dc0eaffdff3fa9161613311c7096eeb3e133ee19
Manifest
canine-c.json · .minisig
Manifest sha256
ed6e92e2b1a3312cc23ec75e1205703fec569c20c4e67cc62834ffb4ba3779ef
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/google/canine-c.json $ curl -O https://freeweights.allternit.com/manifests/google/canine-c.json.minisig $ minisign -Vm canine-c.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/canine-c
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. canine-c.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX