Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bert ¶
type Bert struct {
// contains filtered or unexported fields
}
func (*Bert) Embeddings ¶
func (l *Bert) Embeddings(text string, opts ...PredictOption) ([]float32, error)
func (*Bert) TokenEmbeddings ¶
func (l *Bert) TokenEmbeddings(tokens []int, opts ...PredictOption) ([]float32, error)
type PredictOption ¶
type PredictOption func(p *PredictOptions)
func SetEmbeddingSize ¶
func SetEmbeddingSize(es int) PredictOption
SetThreads sets the number of threads to use for text generation.
func SetThreads ¶
func SetThreads(threads int) PredictOption
SetThreads sets the number of threads to use for text generation.
type PredictOptions ¶
var DefaultOptions PredictOptions = PredictOptions{
Threads: 4,
EmbeddingSize: 99999,
}
func NewPredictOptions ¶
func NewPredictOptions(opts ...PredictOption) PredictOptions
Create a new PredictOptions object with the given options.
Click to show internal directories.
Click to hide internal directories.