j_yoon.song commited on
Commit
1f16be9
·
1 Parent(s): 5f67fb5
Files changed (2) hide show
  1. app.py +3 -3
  2. src/display/utils.py +27 -21
app.py CHANGED
@@ -188,9 +188,9 @@ with demo:
188
  base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
189
  vllm_version_type = gr.Dropdown(
190
  choices=["v0.9.2", "v0.9.2rc2", "v0.9.2rc1", "v0.9.1", "v0.9.1rc2", "v0.9.1rc1", "v0.9.0.1", "v0.9.0", "v0.8.5", "v0.8.5.post1", "v0.8.4", "v0.8.3", "v0.8.3rc1", "v0.8.2", "v0.8.1", "v0.8.0", "v0.8.0rc2", "v0.8.0rc1", "v0.7.3", "v0.7.2", "v0.7.1", "v0.6.6", "v0.6.6.post1", "v0.6.5", "v0.6.4.post1", "v0.6.4", "v0.6.3.post1", "v0.6.2", "v0.6.1", "v0.6.1.post2", "v0.6.1.post1", "v0.6.0"],
191
- label="Model type",
192
  multiselect=False,
193
- value=None,
194
  interactive=True,
195
  )
196
  with gr.Column():
@@ -247,7 +247,7 @@ with demo:
247
  top_p_textbox2 = gr.Textbox(label="Top-p (default: 1.0)", placeholder="1.0")
248
  top_k_textbox2 = gr.Textbox(label="Top-k (default: -1)", placeholder="-1")
249
  presence_penalty_textbox2 = gr.Textbox(label="Presence penalty (default: 0.0)", placeholder="0.0")
250
- frequency_penalty_textbox2 = gr.Textbox(label="Repetition penalty (default: 0.0)", placeholder="0.0")
251
  repetition_penalty_textbox2 = gr.Textbox(label="Repetition penalty (default: 1.0)", placeholder="1.0")
252
 
253
  with gr.Row():
 
188
  base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
189
  vllm_version_type = gr.Dropdown(
190
  choices=["v0.9.2", "v0.9.2rc2", "v0.9.2rc1", "v0.9.1", "v0.9.1rc2", "v0.9.1rc1", "v0.9.0.1", "v0.9.0", "v0.8.5", "v0.8.5.post1", "v0.8.4", "v0.8.3", "v0.8.3rc1", "v0.8.2", "v0.8.1", "v0.8.0", "v0.8.0rc2", "v0.8.0rc1", "v0.7.3", "v0.7.2", "v0.7.1", "v0.6.6", "v0.6.6.post1", "v0.6.5", "v0.6.4.post1", "v0.6.4", "v0.6.3.post1", "v0.6.2", "v0.6.1", "v0.6.1.post2", "v0.6.1.post1", "v0.6.0"],
191
+ label="vLLM version",
192
  multiselect=False,
193
+ value="v0.9.2",
194
  interactive=True,
195
  )
196
  with gr.Column():
 
247
  top_p_textbox2 = gr.Textbox(label="Top-p (default: 1.0)", placeholder="1.0")
248
  top_k_textbox2 = gr.Textbox(label="Top-k (default: -1)", placeholder="-1")
249
  presence_penalty_textbox2 = gr.Textbox(label="Presence penalty (default: 0.0)", placeholder="0.0")
250
+ frequency_penalty_textbox2 = gr.Textbox(label="Frequency penalty (default: 0.0)", placeholder="0.0")
251
  repetition_penalty_textbox2 = gr.Textbox(label="Repetition penalty (default: 1.0)", placeholder="1.0")
252
 
253
  with gr.Row():
src/display/utils.py CHANGED
@@ -61,27 +61,27 @@ class ModelDetails:
61
  symbol: str = "" # emoji
62
 
63
 
64
- class ModelType(Enum):
65
- PT = ModelDetails(name="pretrained", symbol="🟢")
66
- FT = ModelDetails(name="fine-tuned", symbol="🔶")
67
- IFT = ModelDetails(name="instruction-tuned", symbol="â­•")
68
- RL = ModelDetails(name="RL-tuned", symbol="🟦")
69
- Unknown = ModelDetails(name="", symbol="?")
70
-
71
- def to_str(self, separator=" "):
72
- return f"{self.value.symbol}{separator}{self.value.name}"
73
-
74
- @staticmethod
75
- def from_str(type):
76
- if "fine-tuned" in type or "🔶" in type:
77
- return ModelType.FT
78
- if "pretrained" in type or "🟢" in type:
79
- return ModelType.PT
80
- if "RL-tuned" in type or "🟦" in type:
81
- return ModelType.RL
82
- if "instruction-tuned" in type or "â­•" in type:
83
- return ModelType.IFT
84
- return ModelType.Unknown
85
 
86
  class WeightType(Enum):
87
  Adapter = ModelDetails("Adapter")
@@ -91,6 +91,8 @@ class WeightType(Enum):
91
  class Precision(Enum):
92
  float16 = ModelDetails("float16")
93
  bfloat16 = ModelDetails("bfloat16")
 
 
94
  Unknown = ModelDetails("?")
95
 
96
  def from_str(precision):
@@ -98,6 +100,10 @@ class Precision(Enum):
98
  return Precision.float16
99
  if precision in ["torch.bfloat16", "bfloat16"]:
100
  return Precision.bfloat16
 
 
 
 
101
  return Precision.Unknown
102
 
103
  # Column selection
 
61
  symbol: str = "" # emoji
62
 
63
 
64
+ # class ModelType(Enum):
65
+ # PT = ModelDetails(name="pretrained", symbol="🟢")
66
+ # FT = ModelDetails(name="fine-tuned", symbol="🔶")
67
+ # IFT = ModelDetails(name="instruction-tuned", symbol="â­•")
68
+ # RL = ModelDetails(name="RL-tuned", symbol="🟦")
69
+ # Unknown = ModelDetails(name="", symbol="?")
70
+
71
+ # def to_str(self, separator=" "):
72
+ # return f"{self.value.symbol}{separator}{self.value.name}"
73
+
74
+ # @staticmethod
75
+ # def from_str(type):
76
+ # if "fine-tuned" in type or "🔶" in type:
77
+ # return ModelType.FT
78
+ # if "pretrained" in type or "🟢" in type:
79
+ # return ModelType.PT
80
+ # if "RL-tuned" in type or "🟦" in type:
81
+ # return ModelType.RL
82
+ # if "instruction-tuned" in type or "â­•" in type:
83
+ # return ModelType.IFT
84
+ # return ModelType.Unknown
85
 
86
  class WeightType(Enum):
87
  Adapter = ModelDetails("Adapter")
 
91
  class Precision(Enum):
92
  float16 = ModelDetails("float16")
93
  bfloat16 = ModelDetails("bfloat16")
94
+ fp8 = ModelDetails("fp8")
95
+ int4 = ModelDetails("int4")
96
  Unknown = ModelDetails("?")
97
 
98
  def from_str(precision):
 
100
  return Precision.float16
101
  if precision in ["torch.bfloat16", "bfloat16"]:
102
  return Precision.bfloat16
103
+ if precision == "fp8":
104
+ return Precision.fp8
105
+ if precision == "int4":
106
+ return Precision.int4
107
  return Precision.Unknown
108
 
109
  # Column selection