(parser)
| 180 | |
| 181 | |
| 182 | def 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 | |
| 218 | class VicunaAdapter(BaseAdapter): |
nothing calls this directly
no outgoing calls
no test coverage detected