Views
No views yet
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|---|---|---|---|---|---|
| main | 4 | 128 | VMware Open Instruct | 4096 | 5.96 GB |
1build:
2 cuda_version: "12.1.1"
3 system_packages:
4 - "libssl-dev"
5 python_packages:
6 - "torch==2.1.2"
7 - "vllm==0.2.6"
8 - "transformers==4.36.2"
9 - "accelerate==0.25.0"1from vllm import LLM, SamplingParams
2
3class InferlessPythonModel:
4 def initialize(self):
5
6 self.sampling_params = SamplingParams(temperature=0.7, top_p=0.95,max_tokens=256)
7 self.llm = LLM(model="Inferless/SOLAR-10.7B-Instruct-v1.0-GPTQ", quantization="gptq", dtype="float16")
8
9 def infer(self, inputs):
10 prompts = inputs["prompt"]
11 result = self.llm.generate(prompts, self.sampling_params)
12 result_output = [[[output.outputs[0].text,output.outputs[0].token_ids] for output in result]
13
14 return {'generated_result': result_output[0]}
15
16 def finalize(self):
17 pass