Kquant03 commited on
Commit
50e0bfa
1 Parent(s): 52764da

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md CHANGED
@@ -1,3 +1,70 @@
1
  ---
2
  license: mit
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
+ thumbnail: "https://cdn-uploads.huggingface.co/production/uploads/6589d7e6586088fd2784a12c/2g6TFg4nLSigVy7n1wLYV.png"
6
  ---
7
+ # Done on 64GB of system RAM, and a Ryzen 5 5600...no GPU needed
8
+
9
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6589d7e6586088fd2784a12c/2g6TFg4nLSigVy7n1wLYV.png)
10
+
11
+ ### Passthrough was used to create this model.
12
+
13
+
14
+ [Kronos](https://www.theoi.com/Titan/TitanKronos.html) was a titan, and this model is named after him for the sheer size of the model.
15
+
16
+ By concatenating layers from different LLMs, the method used for this model, passthrough. can produce models with an exotic number of parameters (e.g., 9B with two 7B parameter models). These models are often referred to as "frankenmerges" or "Frankenstein models" by the community.
17
+
18
+
19
+ Many thanks to [Abacaj](https://huggingface.co/abacaj) for providing the [fine tuned weights](https://huggingface.co/abacaj/phi-2-super) that were used in the creation of this base model. You can find the full script for how the model was merged [here](https://huggingface.co/Replete-AI/Phi-Elothir/blob/main/mergekit_config.yml)...thanks to [KatyTheCutie](https://huggingface.co/KatyTheCutie) for inspring me to test out this script.
20
+
21
+ ## This idea was brought to me by [The Face of Goonery](https://huggingface.co/The-Face-Of-Goonery), also known as Caleb Morgan.
22
+ # How to run inference:
23
+
24
+ ```python
25
+ import transformers
26
+ import torch
27
+
28
+ if __name__ == "__main__":
29
+ model_name = "Replete-AI/Kronos-670B"
30
+ tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
31
+
32
+ model = (
33
+ transformers.AutoModelForCausalLM.from_pretrained(
34
+ model_name,
35
+ )
36
+ .to("cuda:0")
37
+ .eval()
38
+ )
39
+
40
+ messages = [
41
+ {"role": "user", "content": "Hello, who are you?"}
42
+ ]
43
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
44
+ input_ids_cutoff = inputs.size(dim=1)
45
+
46
+ with torch.no_grad():
47
+ generated_ids = model.generate(
48
+ input_ids=inputs,
49
+ use_cache=True,
50
+ max_new_tokens=512,
51
+ temperature=0.2,
52
+ top_p=0.95,
53
+ do_sample=True,
54
+ eos_token_id=tokenizer.eos_token_id,
55
+ pad_token_id=tokenizer.pad_token_id,
56
+ )
57
+
58
+ completion = tokenizer.decode(
59
+ generated_ids[0][input_ids_cutoff:],
60
+ skip_special_tokens=True,
61
+ )
62
+
63
+ print(completion)
64
+ ```
65
+
66
+ # Chat template
67
+
68
+ The model uses the same chat template as found in Mistral instruct models:
69
+
70
+ # [Join the Replete AI Discord here!](https://discord.gg/tG5aY4EX4T)