package kaun
Flax-inspired neural network library for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
raven-1.0.0.alpha1.tbz
sha256=8e277ed56615d388bc69c4333e43d1acd112b5f2d5d352e2453aef223ff59867
sha512=369eda6df6b84b08f92c8957954d107058fb8d3d8374082e074b56f3a139351b3ae6e3a99f2d4a4a2930dd950fd609593467e502368a13ad6217b571382da28c
doc/kaun.models/Kaun_models/Bert/Tokenizer/index.html
Module Bert.Tokenizer
Source
BERT tokenizer instance
Create a WordPiece tokenizer for BERT. Either provide a vocab_file path or a model_id to download from HuggingFace (defaults to bert-base-uncased)
Encode text to token IDs with CLS
and SEP
tokens
Encode text directly to input tensors ready for forward pass
Source
val encode_batch :
t ->
?max_length:int ->
?padding:bool ->
string list ->
(int32, Rune.int32_elt) Rune.t
Encode multiple texts with padding and special tokens
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>