Downloads · 30 days
7
6% of all-time downloads
tranhoangnguyen03/Gemma-2-9B-It-SPPO-Iter3_Q8
Gemma-2-9B-It-SPPO-Iter3_Q8 is a text generation model from tranhoangnguyen03. Use it when you need the model to write or continue text. It is set up for transformers.
Gemma-2-9B-It-SPPO-Iter3 quantized to FP8 weights using dynamic activation scheme, ready for inference with vLLM = 0.5.0.
Downloads · 30 days
7
6% of all-time downloads
All-time downloads
109
Public
Parameters
9.2B
18.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors18.5 GB · 100%
From the Hugging Face model README
Gemma-2-9B-It-SPPO-Iter3 quantized to FP8 weights using dynamic activation scheme, ready for inference with vLLM >= 0.5.0.
Produced using AutoFP8.
from transformers import AutoTokenizer
from auto_fp8 import AutoFP8ForCausalLM, BaseQuantizeConfig
pretrained_model_dir = "UCLA-AGI/Gemma-2-9B-It-SPPO-Iter3"
quantized_model_dir = "/quantized/Gemma-2-9B-It-SPPO-Iter3_Q8"
tokenizer = AutoTokenizer.from_pretrained(pretrained_model_dir)
quantize_config = BaseQuantizeConfig(quant_method="fp8", activation_scheme="dynamic")
model = AutoFP8ForCausalLM.from_pretrained(
pretrained_model_dir, quantize_config=quantize_config
)
model.save_quantized(quantized_model_dir)
vLLM has full support for FP8 models quantized with this package. Install vLLM with: pip install vllm>=0.5.0
Then simply pass the quantized checkpoint directly to vLLM's entrypoints! It will detect the checkpoint format using the quantization_config in the config.json.
from vllm import LLM
model = LLM("tranhoangnguyen03/Gemma-2-9B-It-SPPO-Iter3_Q8")
outputs = model.generate("Once upon a time,")
print(outputs[0].outputs[0].text)
||| TBA |||