munish0838 commited on
Commit
3173e23
1 Parent(s): 1a327ac

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ base_model: mlabonne/Meta-Llama-3-120B-Instruct
8
+ ---
9
+
10
+
11
+ # Meta-Llama-3-120B-Instruct- GGUF
12
+
13
+ - This is quantized version of [mlabonne/Meta-Llama-3-120B-Instruct](https://huggingface.co/mlabonne/Meta-Llama-3-120B-Instruct) created using llama.cpp
14
+
15
+ # Model Description
16
+
17
+ Meta-Llama-3-120B-Instruct is a self-merge with [meta-llama/Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct).
18
+
19
+ It was inspired by large merges like [alpindale/goliath-120b](https://huggingface.co/alpindale/goliath-120b), [nsfwthrowitaway69/Venus-120b-v1.0](https://huggingface.co/nsfwthrowitaway69/Venus-120b-v1.0), [cognitivecomputations/MegaDolphin-120b](https://huggingface.co/cognitivecomputations/MegaDolphin-120b), and [wolfram/miquliz-120b-v2.0](https://huggingface.co/wolfram/miquliz-120b-v2.0).
20
+
21
+ No eval yet, but it is approved by Eric Hartford: https://twitter.com/erhartford/status/1787050962114207886
22
+
23
+ ## 🧩 Configuration
24
+
25
+ ```yaml
26
+ slices:
27
+ - sources:
28
+ - layer_range: [0, 20]
29
+ model: meta-llama/Meta-Llama-3-70B-Instruct
30
+ - sources:
31
+ - layer_range: [10, 30]
32
+ model: meta-llama/Meta-Llama-3-70B-Instruct
33
+ - sources:
34
+ - layer_range: [20, 40]
35
+ model: meta-llama/Meta-Llama-3-70B-Instruct
36
+ - sources:
37
+ - layer_range: [30, 50]
38
+ model: meta-llama/Meta-Llama-3-70B-Instruct
39
+ - sources:
40
+ - layer_range: [40, 60]
41
+ model: meta-llama/Meta-Llama-3-70B-Instruct
42
+ - sources:
43
+ - layer_range: [50, 70]
44
+ model: meta-llama/Meta-Llama-3-70B-Instruct
45
+ - sources:
46
+ - layer_range: [60, 80]
47
+ model: meta-llama/Meta-Llama-3-70B-Instruct
48
+ merge_method: passthrough
49
+ dtype: float16
50
+ ```
51
+
52
+ ## 💻 Usage
53
+
54
+ ```python
55
+ !pip install -qU transformers accelerate
56
+
57
+ from transformers import AutoTokenizer
58
+ import transformers
59
+ import torch
60
+
61
+ model = "mlabonne/Llama-3-120B"
62
+ messages = [{"role": "user", "content": "What is a large language model?"}]
63
+
64
+ tokenizer = AutoTokenizer.from_pretrained(model)
65
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
66
+ pipeline = transformers.pipeline(
67
+ "text-generation",
68
+ model=model,
69
+ torch_dtype=torch.float16,
70
+ device_map="auto",
71
+ )
72
+
73
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
74
+ print(outputs[0]["generated_text"])
75
+ ```