MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / add_model_args

Function add_model_args

toolbench/model/model_adapter.py:182–215  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

180
181
182def add_model_args(parser):
183 parser.add_argument(
184 "--model-path",
185 type=str,
186 default="lmsys/fastchat-t5-3b-v1.0",
187 help="The path to the weights. This can be a local folder or a Hugging Face repo ID.",
188 )
189 parser.add_argument(
190 "--device",
191 type=str,
192 choices=["cpu", "cuda"],
193 default="cuda",
194 help="The device type",
195 )
196 parser.add_argument(
197 "--gpus",
198 type=str,
199 default=None,
200 help="A single GPU like 1 or multiple GPUs like 0,2",
201 )
202 parser.add_argument("--num-gpus", type=int, default=1)
203 parser.add_argument(
204 "--max-gpu-memory",
205 type=str,
206 help="The maximum memory per gpu. Use a string like '13Gib'",
207 )
208 parser.add_argument(
209 "--load-8bit", action="store_true", help="Use 8-bit quantization"
210 )
211 parser.add_argument(
212 "--cpu-offloading",
213 action="store_true",
214 help="Only when using 8-bit quantization: Offload excess weights to the CPU that don't fit on the GPU",
215 )
216
217
218class VicunaAdapter(BaseAdapter):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected