Skip to content

Commit a167825

Browse files
remove dup quant parsing from individual model class
1 parent ac5b4c0 commit a167825

29 files changed

Lines changed: 0 additions & 193 deletions

pkg/hfutil/modelconfig/baichuan.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ func (c *BaichuanConfig) GetModelSizeBytes() int64 {
8888
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
8989
}
9090

91-
// GetQuantizationType returns the quantization method used (if any)
92-
func (c *BaichuanConfig) GetQuantizationType() string {
93-
return "" // No quantization by default
94-
}
95-
9691
// HasVision returns false for Baichuan base models
9792
func (c *BaichuanConfig) HasVision() bool {
9893
return false

pkg/hfutil/modelconfig/bert.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ func (c *BertConfig) GetModelSizeBytes() int64 {
109109
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
110110
}
111111

112-
// GetQuantizationType returns the quantization method used (if any)
113-
func (c *BertConfig) GetQuantizationType() string {
114-
return "" // No quantization by default
115-
}
116-
117112
// HasVision returns false for BERT models
118113
func (c *BertConfig) HasVision() bool {
119114
return false

pkg/hfutil/modelconfig/chatglm.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ func (c *ChatGLMConfig) GetModelSizeBytes() int64 {
111111
return EstimateModelSizeBytes(c.GetParameterCount(), dtype)
112112
}
113113

114-
// GetQuantizationType returns the quantization method used (if any)
115-
func (c *ChatGLMConfig) GetQuantizationType() string {
116-
return "" // No quantization by default
117-
}
118-
119114
// HasVision returns false for ChatGLM base models
120115
func (c *ChatGLMConfig) HasVision() bool {
121116
return false

pkg/hfutil/modelconfig/command_r.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ func (c *CommandRConfig) GetModelSizeBytes() int64 {
100100
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
101101
}
102102

103-
// GetQuantizationType returns the quantization method used (if any)
104-
func (c *CommandRConfig) GetQuantizationType() string {
105-
return "" // No quantization by default
106-
}
107-
108103
// HasVision returns false for Command-R base models
109104
func (c *CommandRConfig) HasVision() bool {
110105
return false

pkg/hfutil/modelconfig/dbrx.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ func (c *DBRXConfig) GetModelSizeBytes() int64 {
130130
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
131131
}
132132

133-
// GetQuantizationType returns the quantization method used (if any)
134-
func (c *DBRXConfig) GetQuantizationType() string {
135-
return "" // No quantization by default
136-
}
137-
138133
// HasVision returns false for DBRX base models
139134
func (c *DBRXConfig) HasVision() bool {
140135
return false

pkg/hfutil/modelconfig/deepseek_v3.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ type DeepseekV3Config struct {
6464
// RoPE scaling
6565
RopeScaling RopeScalingConfig `json:"rope_scaling"`
6666

67-
// Quantization settings
68-
QuantizationConfig *QuantizationConfig `json:"quantization_config,omitempty"`
69-
7067
// Misc options
7168
TieWordEmbeddings bool `json:"tie_word_embeddings"`
7269
UseCache bool `json:"use_cache"`
@@ -146,14 +143,6 @@ func (c *DeepseekV3Config) GetTransformerVersion() string {
146143
return c.BaseModelConfig.TransformerVersion
147144
}
148145

149-
// GetQuantizationType returns the quantization method used (if any)
150-
func (c *DeepseekV3Config) GetQuantizationType() string {
151-
if c.QuantizationConfig != nil && c.QuantizationConfig.QuantMethod != "" {
152-
return c.QuantizationConfig.QuantMethod
153-
}
154-
return ""
155-
}
156-
157146
// GetArchitecture returns the model architecture
158147
func (c *DeepseekV3Config) GetArchitecture() string {
159148
if len(c.Architectures) > 0 {

pkg/hfutil/modelconfig/deepseek_vl.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,6 @@ func (c *DeepSeekVLConfig) GetModelSizeBytes() int64 {
171171
return EstimateModelSizeBytes(c.GetParameterCount(), dtype)
172172
}
173173

174-
// GetQuantizationType returns the quantization method used (if any)
175-
func (c *DeepSeekVLConfig) GetQuantizationType() string {
176-
return "" // No quantization by default
177-
}
178-
179174
// HasVision returns true for DeepSeek VL models
180175
func (c *DeepSeekVLConfig) HasVision() bool {
181176
return true

pkg/hfutil/modelconfig/exaone.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ func (c *ExaoneConfig) GetModelSizeBytes() int64 {
102102
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
103103
}
104104

105-
// GetQuantizationType returns the quantization method used (if any)
106-
func (c *ExaoneConfig) GetQuantizationType() string {
107-
return "" // No quantization by default
108-
}
109-
110105
// HasVision returns false for ExaONE base models
111106
func (c *ExaoneConfig) HasVision() bool {
112107
return false

pkg/hfutil/modelconfig/gemma.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ func (c *GemmaConfig) GetModelSizeBytes() int64 {
127127
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
128128
}
129129

130-
// GetQuantizationType returns the quantization method used (if any)
131-
func (c *GemmaConfig) GetQuantizationType() string {
132-
return "" // No quantization by default
133-
}
134-
135130
// HasVision returns false for Gemma base models
136131
func (c *GemmaConfig) HasVision() bool {
137132
return false

pkg/hfutil/modelconfig/gemma3.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ func (c *Gemma3Config) GetModelSizeBytes() int64 {
133133
return EstimateModelSizeBytes(c.GetParameterCount(), c.TorchDtype)
134134
}
135135

136-
// GetQuantizationType returns the quantization method used (if any)
137-
func (c *Gemma3Config) GetQuantizationType() string {
138-
return "" // No quantization by default
139-
}
140-
141136
// HasVision returns true since Gemma3 is a multimodal vision model
142137
func (c *Gemma3Config) HasVision() bool {
143138
return true

0 commit comments

Comments
 (0)