Docs.rs
sbert-0.4.1
sbert 0.4.1
Permalink
Docs.rs crate page
Apache-2.0
Links
Repository
Crates.io
Source
Owners
cpcdoy
Dependencies
lazy_static ^1.4
normal
log ^0.4
normal
num_cpus ^1.13
normal
prost ^0.9
normal
rayon ^1.5
normal
rust-bert ^0.21.0
normal
rust_tokenizers ^7.0
normal
serde ^1.0
normal
strum ^0.23
normal
strum_macros ^0.23
normal
tch ^0.13.0
normal
thiserror ^1.0
normal
tokenizers ^0.11
normal
torch-sys ^0.13.0
normal
criterion ^0.3
dev
rand ^0.8
dev
Versions
Platform
x86_64-unknown-linux-gnu
Feature flags
Rust
About docs.rs
Privacy policy
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
☰
SBertHF
Aliased type
Methods
forward
forward_with_attention
new
tokenizer
In sbert
?
Type Alias
sbert
::
SBertHF
source
·
[
−
]
pub type SBertHF =
SBert
<
HFTokenizer
>;
Aliased Type
§
struct SBertHF { /* private fields */ }
Implementations
§
source
§
impl<T>
SBert
<T>
where T:
Tokenizer
+
Send
+
Sync
,
source
pub fn
new
<P>(root: P) ->
Result
<Self,
Error
>
where P:
Into
<
PathBuf
>,
source
pub fn
forward
<S, B>( &self, input: &
[S]
, batch_size: B ) ->
Result
<
Vec
<
Embeddings
>,
Error
>
where S:
AsRef
<
str
>, B:
Into
<
Option
<
usize
>>,
source
pub fn
forward_with_attention
<S, B>( &self, input: &
[S]
, batch_size: B ) ->
Result
<(
Vec
<
Embeddings
>,
Attentions
),
Error
>
where S:
AsRef
<
str
>, B:
Into
<
Option
<
usize
>>,
source
pub fn
tokenizer
(&self) ->
Arc
<T>