transformers: correctly load automodels (#1643)

* backends(transformers): use AutoModel with LLM types

* examples: animagine-xl

* Add codellama examples
This commit is contained in:
Ettore Di Giacinto 2024-01-26 00:13:21 +01:00 committed by GitHub
parent 3733250b3c
commit cb7512734d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 1144 additions and 569 deletions

View file

@ -63,6 +63,8 @@ func gRPCModelOpts(c config.Config) *pb.ModelOptions {
F16Memory: c.F16,
MLock: c.MMlock,
RopeFreqBase: c.RopeFreqBase,
RopeScaling: c.RopeScaling,
Type: c.ModelType,
RopeFreqScale: c.RopeFreqScale,
NUMA: c.NUMA,
Embeddings: c.Embeddings,

View file

@ -128,7 +128,9 @@ type LLMConfig struct {
Quantization string `yaml:"quantization"`
MMProj string `yaml:"mmproj"`
RopeScaling string `yaml:"rope_scaling"`
RopeScaling string `yaml:"rope_scaling"`
ModelType string `yaml:"type"`
YarnExtFactor float32 `yaml:"yarn_ext_factor"`
YarnAttnFactor float32 `yaml:"yarn_attn_factor"`
YarnBetaFast float32 `yaml:"yarn_beta_fast"`