CoolFace
Modelpublic

dark-pen/apodex-1.0-0.8B-SFT-rebased-AutoRound-W4A16-Tuning

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

apodex-1.0-0.8B-SFT-rebased-AutoRound-W4A16-Tuning

Model Details

This model is a int4 weight-only quantization with group_size 128 and symmetric quantization of dark-pen/apodex-1.0-0.8B-SFT-rebased generated by TUNING. Please follow the license of the original model.

Quantization Details

AttributeValue
Base Modeldark-pen/apodex-1.0-0.8B-SFT-rebased
Quantization ToolTUNING
Quantization SchemeW4A16
Quantized Size925 MB

Evaluation Results

TaskAccuracy
hellaswag0.4030
mmlu0.5018
mmluabstractalgebra0.2900
mmlu_anatomy0.4444
mmlu_astronomy0.5329
mmlubusinessethics0.4800
mmluclinicalknowledge0.5811
mmlucollegebiology0.5972
mmlucollegechemistry0.4200
mmlucollegecomputer_science0.3900
mmlucollegemathematics0.4000
mmlucollegemedicine0.5780
mmlucollegephysics0.4020
mmlucomputersecurity0.6200
mmluconceptualphysics0.5277
mmlu_econometrics0.3596
mmluelectricalengineering0.5517
mmluelementarymathematics0.3783
mmluformallogic0.4603
mmluglobalfacts0.3000
mmluhighschool_biology0.6774
mmluhighschool_chemistry0.5665
mmluhighschoolcomputerscience0.5600
mmluhighschooleuropeanhistory0.5818
mmluhighschool_geography0.6768
mmluhighschoolgovernmentand_politics0.6269
mmluhighschool_macroeconomics0.5410
mmluhighschool_mathematics0.3222
mmluhighschool_microeconomics0.5714
mmluhighschool_physics0.3775
mmluhighschool_psychology0.7119
mmluhighschool_statistics0.4120
mmluhighschoolushistory0.5098
mmluhighschoolworldhistory0.5949
mmluhumanaging0.5336
mmluhumansexuality0.5725
mmlu_humanities0.4306
mmluinternationallaw0.6942
mmlu_jurisprudence0.6667
mmlulogicalfallacies0.5521
mmlumachinelearning0.4464
mmlu_management0.7476
mmlu_marketing0.7778
mmlumedicalgenetics0.5400
mmlu_miscellaneous0.5824
mmlumoraldisputes0.5694
mmlumoralscenarios0.2447
mmlu_nutrition0.6144
mmlu_other0.5529
mmlu_philosophy0.5531
mmlu_prehistory0.5031
mmluprofessionalaccounting0.3936
mmluprofessionallaw0.3442
mmluprofessionalmedicine0.4669
mmluprofessionalpsychology0.4755
mmlupublicrelations0.5545
mmlusecuritystudies0.5837
mmlusocialsciences0.5886
mmlu_sociology0.7363
mmlu_stem0.4729
mmluusforeign_policy0.6200
mmlu_virology0.4337
mmluworldreligions0.5965
piqa0.6953

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 = "apodex-1.0-0.8B-SFT-rebased-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 apodex-1.0-0.8B-SFT-rebased-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.