mgoin commited on
Commit
b3b9cd2
·
1 Parent(s): fed89b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -28,7 +28,7 @@ from deepsparse import TextGeneration
28
  system_message = ""
29
  prompt = "Write a quick sort algorithm in Python"
30
  formatted_prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"
31
- model = TextGeneration(model="hf:mgoin/Nous-Hermes-llama-2-7b-pruned50-quant-ds")
32
  print(model(formatted_prompt, max_new_tokens=500).generations[0].text)
33
  ```
34
 
@@ -51,7 +51,7 @@ See the `recipe.yaml` in this repo and follow the instructions below.
51
  git clone https://github.com/neuralmagic/sparseml
52
  pip install -e "sparseml[transformers]"
53
  python sparseml/src/sparseml/transformers/sparsification/obcq/obcq.py teknium/OpenHermes-2.5-Mistral-7B open_platypus --recipe recipe.yaml --save True
54
- python sparseml/src/sparseml/transformers/sparsification/obcq/export.py --task text-generation --model_path obcq_deployment
55
  cp deployment/model.onnx deployment/model-orig.onnx
56
  ```
57
 
 
28
  system_message = ""
29
  prompt = "Write a quick sort algorithm in Python"
30
  formatted_prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"
31
+ model = TextGeneration(model="hf:mgoin/OpenHermes-2.5-Mistral-7B-pruned50-quant-ds")
32
  print(model(formatted_prompt, max_new_tokens=500).generations[0].text)
33
  ```
34
 
 
51
  git clone https://github.com/neuralmagic/sparseml
52
  pip install -e "sparseml[transformers]"
53
  python sparseml/src/sparseml/transformers/sparsification/obcq/obcq.py teknium/OpenHermes-2.5-Mistral-7B open_platypus --recipe recipe.yaml --save True
54
+ python sparseml/src/sparseml/transformers/sparsification/obcq/export.py --task text-generation --model_path obcq_deployment --sequence_length 4096
55
  cp deployment/model.onnx deployment/model-orig.onnx
56
  ```
57