jadehardouin commited on
Commit
9793af4
1 Parent(s): 1c2b775

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +11 -11
models.py CHANGED
@@ -112,7 +112,7 @@ class OpenAIModel(BaseTCOModel):
112
 
113
  self.labor = gr.Number(0, visible=False,
114
  label="($) Labor cost per month",
115
- info="This is how much it will cost you to have an engineer specialized in Machine Learning take care of the deployment of your model service",
116
  interactive=True
117
  )
118
 
@@ -144,8 +144,9 @@ class OpenSourceLlama2Model(BaseTCOModel):
144
  visible=False,
145
  label="Instance of VM with GPU",
146
  )
147
- self.vm_cost_per_hour = gr.Number(2.21, label="VM instance cost ($) per hour", info="Note that this is the cost for a single VM instance, it is doubled in our case since two GPUs are needed",
148
  interactive=False, visible=False)
 
149
  self.input_tokens_cost_per_second = gr.Number(0.00052, visible=False,
150
  label="($) Price/1K input prompt tokens",
151
  interactive=False
@@ -154,18 +155,17 @@ class OpenSourceLlama2Model(BaseTCOModel):
154
  label="($) Price/1K output prompt tokens",
155
  interactive=False
156
  )
157
- self.info = gr.Markdown("For the Llama2-70B model, we took the cost per input and output tokens values from [these benchmark results](https://www.cursor.so/blog/llama-inference#user-content-fn-llama-paper)", interactive=False, visible=False)
 
 
 
 
158
 
159
  self.labor = gr.Number(10000, visible=False,
160
  label="($) Labor cost per month",
161
- info="This is how much it will cost you to have an engineer specialized in Machine Learning take care of the deployment of your model service",
162
  interactive=True
163
  )
164
-
165
- # self.used = gr.Slider(minimum=0.01, value=30., step=0.01, label="% used",
166
- # info="Percentage of time the GPU is used",
167
- # interactive=True,
168
- # visible=False)
169
 
170
  def compute_cost_per_token(self, input_tokens_cost_per_second, output_tokens_cost_per_second, labor):
171
  cost_per_input_token = (input_tokens_cost_per_second / 1000)
@@ -201,7 +201,7 @@ class CohereModel(BaseTCOModel):
201
 
202
  self.labor = gr.Number(0, visible=False,
203
  label="($) Labor cost per month",
204
- info="This is how much it will cost you to have an engineer specialized in Machine Learning take care of the deployment of your model service",
205
  interactive=True
206
  )
207
 
@@ -254,7 +254,7 @@ class ModelPage:
254
  for model in self.models:
255
  if model.get_name() == name:
256
  output+= [gr.update(visible=True)] * len(model.get_components())
257
- # Set use_case and num_users values in the model
258
  model.use_case = use_case
259
  else:
260
  output+= [gr.update(visible=False)] * len(model.get_components())
 
112
 
113
  self.labor = gr.Number(0, visible=False,
114
  label="($) Labor cost per month",
115
+ info="This is an estimate of the labor cost of the AI engineer in charge of deploying the model",
116
  interactive=True
117
  )
118
 
 
144
  visible=False,
145
  label="Instance of VM with GPU",
146
  )
147
+ self.vm_cost_per_hour = gr.Number(4.42, label="Instance cost ($) per hour",
148
  interactive=False, visible=False)
149
+ self.info_vm = gr.Markdown("This price above is from [CoreWeave's pricing web page](https://www.coreweave.com/gpu-cloud-pricing)", interactive=False, visible=False)
150
  self.input_tokens_cost_per_second = gr.Number(0.00052, visible=False,
151
  label="($) Price/1K input prompt tokens",
152
  interactive=False
 
155
  label="($) Price/1K output prompt tokens",
156
  interactive=False
157
  )
158
+ self.source = gr.Markdown("""<span style="font-size: 16px; font-weight: 600; color: #212529;">Source</span>""")
159
+ self.info = gr.Markdown("The cost per input and output tokens values above are from [these benchmark results](https://www.cursor.so/blog/llama-inference#user-content-fn-llama-paper)",
160
+ label="Source",
161
+ interactive=False,
162
+ visible=False)
163
 
164
  self.labor = gr.Number(10000, visible=False,
165
  label="($) Labor cost per month",
166
+ info="This is an estimate of the labor cost of the AI engineer in charge of deploying the model",
167
  interactive=True
168
  )
 
 
 
 
 
169
 
170
  def compute_cost_per_token(self, input_tokens_cost_per_second, output_tokens_cost_per_second, labor):
171
  cost_per_input_token = (input_tokens_cost_per_second / 1000)
 
201
 
202
  self.labor = gr.Number(0, visible=False,
203
  label="($) Labor cost per month",
204
+ info="This is an estimate of the labor cost of the AI engineer in charge of deploying the model",
205
  interactive=True
206
  )
207
 
 
254
  for model in self.models:
255
  if model.get_name() == name:
256
  output+= [gr.update(visible=True)] * len(model.get_components())
257
+ # Set use_case value in the model
258
  model.use_case = use_case
259
  else:
260
  output+= [gr.update(visible=False)] * len(model.get_components())