MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / encode

Method encode

fairseq/models/roberta/hub_interface.py:36–62  ·  view source on GitHub ↗

BPE-encode a sentence (or multiple sentences). Every sequence begins with a beginning-of-sentence (` `) symbol. Every sentence ends with an end-of-sentence (` `) and we use an extra end-of-sentence (` `) as a separator. Example (single sentence): `<

(self, sentence: str, *addl_sentences, no_separator=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

set_vocabMethod · 0.45
fill_maskMethod · 0.45

Calls 1

encode_lineMethod · 0.80

Tested by

no test coverage detected