malhajar commited on
Commit
a235a41
·
1 Parent(s): 1d03adb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md CHANGED
@@ -34,6 +34,33 @@ will report soon
34
 
35
  `garage-bAInd/Platypus2-70B` was instruction fine-tuned using gptq on 2 L40 48GB.
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  ### Citations
39
  ```bibtex
 
34
 
35
  `garage-bAInd/Platypus2-70B` was instruction fine-tuned using gptq on 2 L40 48GB.
36
 
37
+ ## How to Get Started with the Model
38
+
39
+ Use the code sample provided in the original post to interact with the model.
40
+ ```python
41
+ from transformers import AutoModelForCausalLM, AutoTokenizer
42
+
43
+ model_id = "malhajar/Platypus2-70B-instruct-4bit-gptq"
44
+ model = AutoGPTQForCausalLM.from_quantized(model_id,inject_fused_attention=False,
45
+ use_safetensors=True,
46
+ trust_remote_code=False,
47
+ use_triton=False,
48
+ quantize_config=None)
49
+
50
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
51
+
52
+ question: "Who was the first person to walk on the moon?"
53
+ # For generating a response
54
+ prompt = ''' ### Instruction:
55
+ {question}
56
+
57
+ ### Response:'''
58
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids
59
+ output = model.generate(input_ids)
60
+ response = tokenizer.decode(output[0])
61
+
62
+ print(response)
63
+ ```
64
 
65
  ### Citations
66
  ```bibtex