RichardErkhov commited on
Commit
8424e91
1 Parent(s): 72853c5

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +52 -0
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-notso-base - bnb 8bits
11
+ - Model creator: https://huggingface.co/frankenmerger/
12
+ - Original model: https://huggingface.co/frankenmerger/delta-4b-notso-base/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: apache-2.0
20
+ language:
21
+ - en
22
+ pipeline_tag: text-generation
23
+ tags:
24
+ - conversational
25
+ ---
26
+
27
+
28
+ ## 💻 Usage
29
+
30
+ ```python
31
+ !pip install -qU transformers accelerate
32
+
33
+ from transformers import AutoTokenizer
34
+ import transformers
35
+ import torch
36
+
37
+ model = "gmonsoon/Delta-4B-notso-base"
38
+ messages = [{"role": "user", "content": "What is a large language model?"}]
39
+
40
+ tokenizer = AutoTokenizer.from_pretrained(model)
41
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
42
+ pipeline = transformers.pipeline(
43
+ "text-generation",
44
+ model=model,
45
+ torch_dtype=torch.float16,
46
+ device_map="auto",
47
+ )
48
+
49
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
50
+ print(outputs[0]["generated_text"])
51
+ ```
52
+