vllm

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 7 Imported by: 0 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 ChatRequest

type ChatRequest struct {
	goopenai.ChatCompletionRequest
	BestOf                     int     `json:"best_of,omitempty"`
	UseBeamSearch              bool    `json:"use_beam_search,omitempty"`
	TopK                       int     `json:"top_k,omitempty"`
	MinP                       int     `json:"min_p,omitempty"`
	RepetitionPenalty          float64 `json:"repetition_penalty,omitempty"`
	LengthPenalty              float64 `json:"length_penalty,omitempty"`
	EarlyStopping              bool    `json:"early_stopping,omitempty"`
	IgnoreEos                  bool    `json:"ignore_eos,omitempty"`
	MinTokens                  int     `json:"min_tokens,omitempty"`
	StopTokenIds               []int   `json:"stop_token_ids,omitempty"`
	SkipSpecialTokens          bool    `json:"skip_special_tokens,omitempty"`
	SpacesBetweenSpecialTokens bool    `json:"spaces_between_special_tokens,omitempty"`
}

type CompletionRequest

type CompletionRequest struct {
	goopenai.CompletionRequest
	UseBeamSearch              bool    `json:"use_beam_search,omitempty"`
	TopK                       int     `json:"top_k,omitempty"`
	MinP                       int     `json:"min_p,omitempty"`
	RepetitionPenalty          float64 `json:"repetition_penalty,omitempty"`
	LengthPenalty              float64 `json:"length_penalty,omitempty"`
	EarlyStopping              bool    `json:"early_stopping,omitempty"`
	StopTokenIds               []int   `json:"stop_token_ids,omitempty"`
	IgnoreEos                  bool    `json:"ignore_eos,omitempty"`
	MinTokens                  int     `json:"min_tokens,omitempty"`
	SkipSpecialTokens          bool    `json:"skip_special_tokens,omitempty"`
	SpacesBetweenSpecialTokens bool    `json:"spaces_between_special_tokens,omitempty"`
}

type CostEstimator

type CostEstimator struct {
	// contains filtered or unexported fields
}

func NewCostEstimator

func NewCostEstimator(tc tokenCounter) *CostEstimator

func (*CostEstimator) EstimateChatCompletionPromptToken

func (ce *CostEstimator) EstimateChatCompletionPromptToken(r *ChatRequest) int

func (*CostEstimator) EstimateCompletionPromptToken

func (ce *CostEstimator) EstimateCompletionPromptToken(r *CompletionRequest) int

func (*CostEstimator) EstimateContentTokenCounts

func (ce *CostEstimator) EstimateContentTokenCounts(model string, content string) int

type FuntionCallProp

type FuntionCallProp struct {
	Description string                 `json:"description,omitempty"`
	PropType    string                 `json:"type,omitempty"`
	Enum        []string               `json:"enum,omitempty"`
	Items       interface{}            `json:"items,omitempty"`
	Required    []string               `json:"required,omitempty"`
	Properties  map[string]interface{} `json:"properties,omitempty"`
}

func (*FuntionCallProp) GetDescription

func (p *FuntionCallProp) GetDescription() string

func (*FuntionCallProp) GetEnum

func (p *FuntionCallProp) GetEnum() []string

func (*FuntionCallProp) GetItems

func (p *FuntionCallProp) GetItems() (functionCallProp, error)

func (*FuntionCallProp) GetProperties

func (p *FuntionCallProp) GetProperties() (map[string]functionCallProp, error)

func (*FuntionCallProp) GetRequired

func (p *FuntionCallProp) GetRequired() []string

func (*FuntionCallProp) GetType

func (p *FuntionCallProp) GetType() string

type TokenCounter

type TokenCounter struct {
	// contains filtered or unexported fields
}

func NewTokenCounter

func NewTokenCounter() (*TokenCounter, error)

func (*TokenCounter) Count

func (tc *TokenCounter) Count(model string, input string) int

Jump to

Keyboard shortcuts

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