modelconfig

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxPositionEmbeddings int               `json:"max_position_embeddings"`
	ContextLength         int               `json:"context_length"`
	ImageSize             int               `json:"image_size"`
	ID2Label              map[string]string `json:"id2label"`
	TextConfig            *Config           `json:"text_config"`
	VisionConfig          *Config           `json:"vision_config"`
}

Config contains the model metadata used by Hugot when loading a model.

type SpecialTokensConfig

type SpecialTokensConfig struct {
	SepToken TokenValue `json:"sep_token"`
}

type TokenValue

type TokenValue struct {
	Content string
}

func (*TokenValue) UnmarshalJSON

func (v *TokenValue) UnmarshalJSON(data []byte) error

type TokenizerConfig

type TokenizerConfig struct {
	SepToken     TokenValue `json:"sep_token"`
	UnknownToken TokenValue `json:"unk_token"`
}

type TokenizerJSONConfig

type TokenizerJSONConfig struct {
	PostProcessor struct {
		SpecialTokens map[string]json.RawMessage `json:"special_tokens"`
	} `json:"post_processor"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL