--- license: apache-2.0 datasets: - NeelNanda/pile-10k language: - en tags: - text-generation-inference --- ## Model Details This model is an int8 model quantized from [tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b) using SmoothQuant. ## Env setup [Environment Setup](https://github.com/intel/intel-extension-for-pytorch/tree/release/2.2/examples/cpu/inference/python/llm#3-environment-setup) ## Inferece Use IPEX 2.2 ```bash git clone https://github.com/intel/intel-extension-for-pytorch.git cd intel-extension-for-pytorch/examples/cpu/inference/python/llm git checkout release/2.2 python run.py --benchmark -m tiiuae/falcon-7b --ipex-smooth-quant --qconfig-summary-file --output-dir "saved_results" ``` ## Evaluate ### Evaluate the model ```bash git clone https://github.com/intel/intel-extension-for-pytorch.git cd intel-extension-for-pytorch/examples/cpu/inference/python/llm/single_instance git checkout release/2.2 python run_accuracy.py -m tiiuae/falcon-7b --quantized-model-path --dtype int8 --tasks lambada_openai ``` ### Results | Metric | fp32 | int8 sq | | -------------- | ------ | -------- | | Avg. | 0.6982 | 0.6992 | | lambada_openai | 0.7467 | 0.7648 | | hellaswag | 0.5778 | 0.5659 | | winogrande | 0.6732 | 0.6717 | | piqa | 0.7949 | 0.7943 | ## 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: * [IntelĀ® Neural Compressor](https://github.com/intel/neural-compressor) * [IntelĀ® Extension for PyTorch](https://github.com/intel/intel-extension-for-pytorch)