Spaces:
Runtime error
Runtime error
Clémentine commited on
Commit ·
32b707a
1
Parent(s): 01ea22b
removed quantization to simplify
Browse filesFiles changed (3)
7 unmodified lines89101112131415161718192021227 unmodified linescol_name: str# Init: to update with your specific keysclass Tasks(Enum):# task_key in the json file, metric_key in the json file, name to display in the leaderboardtask0 = Task("anli_r1", "acc", "ANLI")task1 = Task("logiqa", "acc_norm", "LogiQA")TASKS_HARNESS = [task.value.benchmark for task in Tasks]NUM_FEWSHOT = 0 # Change with your few shot# Your leaderboard name7 unmodified lines8910111213141516171819202122237 unmodified linescol_name: str# Select your tasks here# ---------------------------------------------------class Tasks(Enum):# task_key in the json file, metric_key in the json file, name to display in the leaderboardtask0 = Task("anli_r1", "acc", "ANLI")task1 = Task("logiqa", "acc_norm", "LogiQA")NUM_FEWSHOT = 0 # Change with your few shot# ---------------------------------------------------# Your leaderboard name
13 unmodified lines141516171819207 unmodified lines28293031323334353637383 unmodified lines42434445464748495013 unmodified linesjson_filepath: strweight_type: str = "Original"model_type: str = "" # pretrained, finetuned, with RLprecision: str = "" # float16, bfloat16, 8bit, 4bit, GPTQbase_model: Optional[str] = None # for adapter modelsrevision: str = "main" # commitsubmitted_time: Optional[str] = "2022-05-18T11:40:22.519222" # random date just so that we can still order requests by date7 unmodified linesif self.precision in ["float16", "bfloat16"]:model_args += f",dtype={self.precision}"elif self.precision == "8bit":model_args += ",load_in_8bit=True"elif self.precision == "4bit":model_args += ",load_in_4bit=True"elif self.precision == "GPTQ":# A GPTQ model does not need dtype to be specified,# it will be inferred from the configpass3 unmodified linesreturn model_argsdef set_eval_request(api: HfApi, eval_request: EvalRequest, set_to_status: str, hf_repo: str, local_dir: str):"""Updates a given eval request with its new status on the hub (running, completed, failed, ...)"""json_filepath = eval_request.json_filepath13 unmodified lines141516171819207 unmodified lines2829303132333435363738393 unmodified lines4344454647484913 unmodified linesjson_filepath: strweight_type: str = "Original"model_type: str = "" # pretrained, finetuned, with RLprecision: str = "" # float16, bfloat16base_model: Optional[str] = None # for adapter modelsrevision: str = "main" # commitsubmitted_time: Optional[str] = "2022-05-18T11:40:22.519222" # random date just so that we can still order requests by date7 unmodified linesif self.precision in ["float16", "bfloat16"]:model_args += f",dtype={self.precision}"# Quantized models need some added config, the install of bits and bytes, etc#elif self.precision == "8bit":# model_args += ",load_in_8bit=True"#elif self.precision == "4bit":# model_args += ",load_in_4bit=True"#elif self.precision == "GPTQ":# A GPTQ model does not need dtype to be specified,# it will be inferred from the configpass3 unmodified linesreturn model_argsdef set_eval_request(api: HfApi, eval_request: EvalRequest, set_to_status: str, hf_repo: str, local_dir: str):"""Updates a given eval request with its new status on the hub (running, completed, failed, ...)"""json_filepath = eval_request.json_filepath
93 unmodified lines9495969798991001011021 unmodified line10410510610710810911011111211311411593 unmodified linesclass Precision(Enum):float16 = ModelDetails("float16")bfloat16 = ModelDetails("bfloat16")qt_8bit = ModelDetails("8bit")qt_4bit = ModelDetails("4bit")qt_GPTQ = ModelDetails("GPTQ")Unknown = ModelDetails("?")def from_str(precision):1 unmodified linereturn Precision.float16if precision in ["torch.bfloat16", "bfloat16"]:return Precision.bfloat16if precision in ["8bit"]:return Precision.qt_8bitif precision in ["4bit"]:return Precision.qt_4bitif precision in ["GPTQ", "None"]:return Precision.qt_GPTQreturn Precision.Unknown# Column selection93 unmodified lines9495969798991001011021 unmodified line10410510610710810911011111211311411593 unmodified linesclass Precision(Enum):float16 = ModelDetails("float16")bfloat16 = ModelDetails("bfloat16")#qt_8bit = ModelDetails("8bit")#qt_4bit = ModelDetails("4bit")#qt_GPTQ = ModelDetails("GPTQ")Unknown = ModelDetails("?")def from_str(precision):1 unmodified linereturn Precision.float16if precision in ["torch.bfloat16", "bfloat16"]:return Precision.bfloat16#if precision in ["8bit"]:# return Precision.qt_8bit#if precision in ["4bit"]:# return Precision.qt_4bit#if precision in ["GPTQ", "None"]:# return Precision.qt_GPTQreturn Precision.Unknown# Column selection
src/about.py+4-3
src/backend/manage_requests.py+8-9
src/display/utils.py+9-9