Downloads · 30 days
88
18% of all-time downloads
OpenVINO/Phi-4-mini-FastDraft-120M-int8-ov
Phi-4-mini-FastDraft-120M-int8-ov is a machine learning model from OpenVINO. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as intel-research.
FastDraft is a novel and efficient approach for pre-training and aligning a draft model to any LLM to be used with speculative decoding, by incorporating efficient pre-training followed by fine-tuning over synthetic d…
Downloads · 30 days
88
18% of all-time downloads
All-time downloads
490
Public
Repo size
149 MB
Likes
2
Public
Click a slice to open those files.
.bin133 MB · 86%
From the Hugging Face model README
FastDraft is a novel and efficient approach for pre-training and aligning a draft model to any LLM to be used with speculative decoding, by incorporating efficient pre-training followed by fine-tuning over synthetic datasets generated by the target model. FastDraft was presented in https://arxiv.org/abs/2411.11055 at ENLSP@NeurIPS24 by Intel Labs.
This is a draft model that was trained with FastDraft to accompany Phi-4-mini-instruct. This is Phi-4-mini-FastDraft-120M model converted to the OpenVINO™ IR (Intermediate Representation) format with weights compressed to INT8 by Optimum.
Weight compression was performed using nncf.compress_weights with the following parameters:
For more information on quantization, check the OpenVINO model optimization guide.
The provided OpenVINO™ IR model is compatible with:
pip install openvino-genai huggingface_hub
import huggingface_hub as hf_hub
main_model_id = "OpenVINO/Phi-4-mini-instruct-int4-ov"
draft_model_id = "OpenVINO/Phi-4-mini-FastDraft-120M-int8-ov"
main_model_path = "main"
draft_model_path = "draft"
hf_hub.snapshot_download(main_model_id, local_dir=main_model_path)
hf_hub.snapshot_download(draft_model_id, local_dir=draft_model_path)
import openvino_genai
prompt = “What is OpenVINO?”
config = openvino_genai.GenerationConfig()
config.num_assistant_tokens = 3
config.max_new_tokens = 128
def streamer(subword):
print(subword, end='', flush=True)
return False
main_device = "CPU"
draft_device = "CPU"
draft_model = openvino_genai.draft_model(draft_model_path, draft_device)
pipe = openvino_genai.LLMPipeline(args.model_dir, main_device, draft_model=draft_model)
pipe.generate(prompt, config, streamer)
More GenAI usage examples can be found in OpenVINO GenAI library docs and samples
The model is distributed under the Intel Research Use License Agreement.
Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See Intel’s Global Human Rights Principles. Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.