|
LLM_MODEL_ARCHS = { |
|
"stablelm_epoch": "🔴 StableLM-Epoch", |
|
"stablelm_alpha": "🔴 StableLM-Alpha", |
|
"mixformer-sequential": "🧑💻 Phi φ", |
|
"RefinedWebModel": "🦅 Falcon", |
|
"gpt_bigcode": "⭐ StarCoder", |
|
"RefinedWeb": "🦅 Falcon", |
|
"baichuan": "🌊 Baichuan 百川", |
|
"internlm": "🧑🎓 InternLM 书生", |
|
"mistral": "Ⓜ️ Mistral", |
|
"mixtral": "Ⓜ️ Mixtral", |
|
"codegen": "♾️ CodeGen", |
|
"chatglm": "💬 ChatGLM", |
|
"falcon": "🦅 Falcon", |
|
"bloom": "🌸 Bloom", |
|
"llama": "🦙 LLaMA", |
|
"rwkv": "🐦⬛ RWKV", |
|
"deci": "🔵 deci", |
|
"Yi": "🫂 Yi 人", |
|
"mpt": "🧱 MPT", |
|
|
|
"gpt_neox": "GPT-NeoX", |
|
"gpt_neo": "GPT-Neo", |
|
"gpt2": "GPT-2", |
|
"gptj": "GPT-J", |
|
"xglm": "XGLM", |
|
"bart": "BART", |
|
"opt": "OPT", |
|
} |
|
|
|
|
|
def model_hyperlink(link, model_name): |
|
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>' |
|
|
|
|
|
def process_arch(model_arch): |
|
if model_arch in LLM_MODEL_ARCHS: |
|
return LLM_MODEL_ARCHS[model_arch] |
|
else: |
|
return model_arch |
|
|
|
|
|
def process_score(score, quantization): |
|
if quantization != "None": |
|
return f"{score:.2f}*" |
|
else: |
|
return f"{score:.2f} " |
|
|
|
|
|
def process_quantization_scheme(x): |
|
if x["backend.quantization_scheme"] == "bnb" and x["backend.quantization_config.load_in_4bit"] == True: |
|
return "BnB.4bit" |
|
elif x["backend.quantization_scheme"] == "bnb" and x["backend.quantization_config.load_in_8bit"] == True: |
|
return "BnB.8bit" |
|
elif (x["backend.quantization_scheme"] == "gptq") and ( |
|
x["backend.quantization_config.exllama_config.version"] == 1 |
|
): |
|
return "GPTQ.4bit+ExllamaV1" |
|
elif (x["backend.quantization_scheme"] == "gptq") and ( |
|
x["backend.quantization_config.exllama_config.version"] == 2 |
|
): |
|
return "GPTQ.4bit+ExllamaV2" |
|
elif x["backend.quantization_scheme"] == "gptq" and x["backend.quantization_config.bits"] == 4: |
|
return "GPTQ.4bit" |
|
elif x["backend.quantization_scheme"] == "awq" and x["backend.quantization_config.version"] == "gemm": |
|
return "AWQ.4bit+GEMM" |
|
elif x["backend.quantization_scheme"] == "awq" and x["backend.quantization_config.version"] == "gemv": |
|
return "AWQ.4bit+GEMV" |
|
else: |
|
return "None" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|