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

canine-s

Date: 2026-11-14Commit: 75d6d0bSigned: 2DC28CC7B26A283B ✓

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

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

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

Works with

Evaluate with

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 75d6d0b. Shown as plain text with links; images open at the publisher.

CANINE-s (CANINE pre-trained with subword 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-s) is trained with a subword loss, meaning that the model needs to predict the identities of subword tokens, while taking characters as input. By reading characters yet predicting subword tokens, the hard token boundary constraint found in other models such as BERT is turned into a soft inductive bias in CANINE.
  • 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-s')
tokenizer = CanineTokenizer.from_pretrained('google/canine-s')

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.32 KBb9416b3021f73bb857d43ebfc515bec12b3bcfa88ac71f2f54586f448817ccf7
config.json670 B8ab81540ab16de2b734e5e3e0012ad4d05dafac7dab38a2cb3d2f11a75b004e1
model.safetensors528 MB16b918c3a6baa71a0e80e0d9376a01e60e78d1da5b073650fbb47ea575458748
pytorch_model.bin529 MB29597dae5a7818dd6eae9d58b91033c760f9324d0a35ec0065180eb6c424f9b5
special_tokens_map.json657 B63ade5ba36d52c1243ecf9f93e44cd8831595f076556c78982db89268e875a81
tokenizer_config.json854 B93cfe4485557c29e3f843165f3f796673a9f0602f756653cdfd4e65277d727db
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
75d6d0b3f4 pinned now manifest updated, same commit2026-11-14 21:36 UTC7 files · 1.06 GB
75d6d0b3f42026-11-14 21:36 UTC7 files · 1.06 GB

Use it

$ fw get google/canine-s
# manifest sha256 5bbd04625de2… · 1.06 GB · 7 files
$ fw verify ./canine-s google/canine-s
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/google/canine-s.json --dir ./canine-s $ python3 fw.py verify ./canine-s ./google__canine-s.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/canine-s --revision 75d6d0b3f4d0bffed0ca7ddd0b73949977d4ca02 --local-dir ./canine-s
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-s", revision="75d6d0b3f4d0bffed0ca7ddd0b73949977d4ca02") model = AutoModel.from_pretrained("google/canine-s", revision="75d6d0b3f4d0bffed0ca7ddd0b73949977d4ca02", 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
b9416b3021f73bb857d43ebfc515bec12b3bcfa88ac71f2f54586f448817ccf7
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-sDate: 2026-11-14Commit: 75d6d0bSigned: 2DC28CC7B26A283B ✓
Upstream
google/canine-s
Pinned commit
75d6d0b3f4d0bffed0ca7ddd0b73949977d4ca02
Manifest
canine-s.json · .minisig
Manifest sha256
5bbd04625de2368c1bfdfb039b88b2aef113533afbd108d46a6760e74eb35c1c
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-s.json $ curl -O https://freeweights.allternit.com/manifests/google/canine-s.json.minisig $ minisign -Vm canine-s.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-s
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. canine-s.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