CoolFace
Modelpublic

LeaderboardModel1/KAT-Coder-V2.5-Dev-AutoRound-W4A16-Tuning

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes257downloads
Model Card

KAT-Coder-V2.5-Dev-AutoRound-W4A16-Tuning

Model Details

This model is a int4 weight-only quantization with group_size 128 and symmetric quantization of Kwaipilot/KAT-Coder-V2.5-Dev generated by TUNING. Please follow the license of the original model.

Quantization Details

AttributeValue
Base ModelKwaipilot/KAT-Coder-V2.5-Dev
Quantization ToolTUNING
Quantization SchemeW4A16
Quantized Size19504 MB

Evaluation Results

TaskAccuracy
hellaswag0.6413
mmlu0.8206
mmluabstractalgebra0.6800
mmlu_anatomy0.8593
mmlu_astronomy0.9408
mmlubusinessethics0.8700
mmluclinicalknowledge0.8868
mmlucollegebiology0.9444
mmlucollegechemistry0.6400
mmlucollegecomputer_science0.7300
mmlucollegemathematics0.6800
mmlucollegemedicine0.8497
mmlucollegephysics0.6667
mmlucomputersecurity0.8700
mmluconceptualphysics0.9234
mmlu_econometrics0.7982
mmluelectricalengineering0.8483
mmluelementarymathematics0.8148
mmluformallogic0.6825
mmluglobalfacts0.5100
mmluhighschool_biology0.9516
mmluhighschool_chemistry0.8276
mmluhighschoolcomputerscience0.9100
mmluhighschooleuropeanhistory0.8788
mmluhighschool_geography0.9343
mmluhighschoolgovernmentand_politics0.9793
mmluhighschool_macroeconomics0.8897
mmluhighschool_mathematics0.6296
mmluhighschool_microeconomics0.9580
mmluhighschool_physics0.7815
mmluhighschool_psychology0.9615
mmluhighschool_statistics0.8194
mmluhighschoolushistory0.9314
mmluhighschoolworldhistory0.9367
mmluhumanaging0.8296
mmluhumansexuality0.8779
mmlu_humanities0.7390
mmluinternationallaw0.9421
mmlu_jurisprudence0.8981
mmlulogicalfallacies0.9141
mmlumachinelearning0.8036
mmlu_management0.8932
mmlu_marketing0.9402
mmlumedicalgenetics0.9300
mmlu_miscellaneous0.9413
mmlumoraldisputes0.8526
mmlumoralscenarios0.4436
mmlu_nutrition0.8954
mmlu_other0.8610
mmlu_philosophy0.8746
mmlu_prehistory0.9043
mmluprofessionalaccounting0.7305
mmluprofessionallaw0.6890
mmluprofessionalmedicine0.9265
mmluprofessionalpsychology0.8922
mmlupublicrelations0.7455
mmlusecuritystudies0.8245
mmlusocialsciences0.9071
mmlu_sociology0.9303
mmlu_stem0.8183
mmluusforeign_policy0.9500
mmlu_virology0.5783
mmluworldreligions0.9357
piqa0.8166

How to Use

HF Usage

Step 1: Install [AutoRound](https://github.com/intel/auto-round)

bash
pip install auto-round

Step 2: Load and run the quantized model

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "KAT-Coder-V2.5-Dev-AutoRound-W4A16-Tuning"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")

# prepare the model input
prompt = "Write a quick sort algorithm."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(**model_inputs, max_new_tokens=512)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :].tolist()

content = tokenizer.decode(output_ids, skip_special_tokens=True)
print("content:", content)

VLLM Usage

bash
vllm serve KAT-Coder-V2.5-Dev-AutoRound-W4A16-Tuning \
    --trust-remote-code \
    --dtype bfloat16 \
    --tensor_parallel_size 1

If you encounter any issues, feel free to open an issue on the AutoRound GitHub repo or provide feedback on the Low-Bit Open LLM Leaderboard.

Ethical Considerations and Limitations

The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs. Therefore, before deploying any applications of the model, developers should perform safety testing.

Caveats and Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Here are a couple of useful links to learn more about Intel's AI software:

Disclaimer

The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.

Cite

@article{cheng2023optimize,
  title={Optimize weight rounding via signed gradient descent for the quantization of llms},
  author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi},
  journal={arXiv preprint arXiv:2309.05516},
  year={2023}
}

arxiv github


This model is part of the [Intel Low-Bit Open LLM Leaderboard](https://huggingface.co/spaces/Intel/low_bit_open_llm_leaderboard) initiative.