RichardErkhov commited on
Commit
a27a25d
1 Parent(s): ced682b

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +59 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ delta-4b-orange - bnb 4bits
11
+ - Model creator: https://huggingface.co/frankenmerger/
12
+ - Original model: https://huggingface.co/frankenmerger/delta-4b-orange/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ widget:
20
+ - text: Hello, My name is Junpei Iori, who are you?
21
+ example_title: Identity
22
+ - text: Describe Aurora Borealis
23
+ example_title: Capabilities
24
+ - text: Create a fastapi endpoint to retrieve the weather given a zip code.
25
+ example_title: Coding
26
+ license: apache-2.0
27
+ language:
28
+ - en
29
+ pipeline_tag: text-generation
30
+ ---
31
+
32
+ delta-4b-orange is frankenmerge of phi-2-orange-v2.
33
+ The purpose is to create 4B parameters model based on Phi-2.
34
+
35
+ ## 💻 Usage
36
+
37
+ ```python
38
+ !pip install -qU transformers accelerate
39
+
40
+ from transformers import AutoTokenizer
41
+ import transformers
42
+ import torch
43
+
44
+ model = "gmonsoon/delta-4b-orange"
45
+ messages = [{"role": "user", "content": "What is a large language model?"}]
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model)
48
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
49
+ pipeline = transformers.pipeline(
50
+ "text-generation",
51
+ model=model,
52
+ torch_dtype=torch.float16,
53
+ device_map="auto",
54
+ )
55
+
56
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
57
+ print(outputs[0]["generated_text"])
58
+ ```
59
+