Views
No views yet
1# pip install deepsparse[llm]
2from deepsparse import TextGeneration
3
4model = TextGeneration(model_path="hf:neuralmagic/Llama-2-7b-pruned50-retrained-instruct-quant-ds")
5
6input_text = "Write me a poem about Machine Learning."
7outputs = model(input_text, max_new_tokens=100)
8print(outputs.generations[0].text)| Benchmark | Metric | Llama-2-7b-instruct | Llama-2-7b-pruned50-retrained-instruct-quant-ds |
|---|---|---|---|
| MMLU | 5-shot | 48.60% | 44.15% |
| HellaSwag | 10-shot | 79.45% | 78.34% |
| WinoGrande | 5-shot | 75.69% | 72.45% |
| ARC-c | 25-shot | 53.92% | 50.51% |
| TruthfulQA | 5-shot | 43.63% | 44.48% |
| GSM8K | 5-shot | 15.92% | 15.31% |