mgoin commited on
Commit
e45f1b2
1 Parent(s): 879bd2e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: neuralmagic/Llama-2-7b-pruned50-retrained
3
+ inference: true
4
+ model_type: llama
5
+ pipeline_tag: text-generation
6
+ datasets:
7
+ - garage-bAInd/Open-Platypus
8
+ - Open-Orca/OpenOrca
9
+ - cognitivecomputations/dolphin
10
+ tags:
11
+ - sparse
12
+ - instruct
13
+ ---
14
+
15
+ # Llama-2-7b-pruned50-retrained-instruct
16
+
17
+ This repo contains a [50% sparse Llama 2 7B](https://huggingface.co/neuralmagic/Llama-2-7b-pruned50-retrained) finetuned for instruction-following tasks using a blend of the Platypus + Open Orca + Dolphin datasets.
18
+
19
+ **Authors**: Neural Magic, Cerebras
20
+
21
+ ## Usage
22
+
23
+ Below we share some code snippets on how to get quickly started with running the model.
24
+
25
+ ### Sparse Transfer
26
+
27
+ By leveraging a pre-sparsified model's structure, you can efficiently fine-tune on new data, leading to reduced hyperparameter tuning, training times, and computational costs. Learn about this process [here](https://neuralmagic.github.io/docs-v2/get-started/transfer).
28
+
29
+ ### Running the model
30
+
31
+ This model may be run with the transformers library. For accelerated inference with sparsity, deploy with [nm-vllm](https://github.com/neuralmagic/nm-vllm) or [deepsparse](https://github.com/neuralmagic/deepsparse).
32
+
33
+ ```python
34
+ # pip install transformers accelerate
35
+ from transformers import AutoTokenizer, AutoModelForCausalLM
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("Llama-2-7b-pruned50-retrained-instruct")
38
+ model = AutoModelForCausalLM.from_pretrained("Llama-2-7b-pruned50-retrained-instruct", device_map="auto")
39
+
40
+ input_text = "Write a recipe for banana bread:\n"
41
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
42
+
43
+ outputs = model.generate(**input_ids)
44
+ print(tokenizer.decode(outputs[0]))
45
+ ```
46
+
47
+ ## Evaluation Benchmark Results
48
+
49
+ Model evaluation metrics and results.
50
+
51
+ | Benchmark | Metric | Llama-2-7b-instruct | Llama-2-7b-pruned70-retrained-instruct |
52
+ |------------------------------------------------|---------------|-------------|-------------------------------|
53
+ | [MMLU](https://arxiv.org/abs/2009.03300) | 5-shot, top-1 | xxxx | xxxx |
54
+ | [HellaSwag](https://arxiv.org/abs/1905.07830) | 0-shot | xxxx | xxxx |
55
+ | [WinoGrande](https://arxiv.org/abs/1907.10641) | partial score | xxxx | xxxx |
56
+ | [ARC-c](https://arxiv.org/abs/1911.01547) | | xxxx | xxxx |
57
+ | [TruthfulQA](https://arxiv.org/abs/2109.07958) | 5-shot | xxxx | xxxx |
58
+ | [HumanEval](https://arxiv.org/abs/2107.03374) | pass@1 | xxxx | xxxx |
59
+ | [GSM8K](https://arxiv.org/abs/2110.14168) | maj@1 | xxxx | xxxx |
60
+
61
+ ## Model Training Details
62
+
63
+ Coming soon.
64
+
65
+ ## Help
66
+
67
+ For further support, and discussions on these models and AI in general, join [Neural Magic's Slack Community](https://join.slack.com/t/discuss-neuralmagic/shared_invite/zt-q1a1cnvo-YBoICSIw3L1dmQpjBeDurQ)