Views
No views yet
pip install torchao;
pip install git+https://github.com/mobiusml/gemlite.git;1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, HqqConfig
3
4model_id = "mobiuslabsgmbh/Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit"
5model = AutoModelForCausalLM.from_pretrained(
6 model_id,
7 torch_dtype=torch.float16,
8 device_map='cuda',
9)
10
11tokenizer = AutoTokenizer.from_pretrained(model_id)1from vllm import LLM
2from vllm.sampling_params import SamplingParams
3
4model_id = "mobiuslabsgmbh/Qwen2.5-7B-Instruct_gemlite-ao_a16w4_gs_128_pack_32bit"
5
6llm = LLM(model=model_id, max_model_len=4096)
7sampling_params = SamplingParams(temperature=0.8, top_p=0.95, max_tokens=1024)
8outputs = llm.generate(["What is the capital of Germany?"], sampling_params)
9print(outputs[0].outputs[0].text)