goldmermaid commited on
Commit
e771915
1 Parent(s): 8c77fe5

Create Readme

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🚀 Falcon-7B 8-bit Model
2
+ This repository is home to the 8-bit of Falcon-7B model, converted from its original model (https://huggingface.co/tiiuae/falcon-7b).
3
+
4
+ Falcon-7B is a 7B parameters causal decoder-only model built by TII and trained on 1,500B tokens of RefinedWeb enhanced with curated corpora. It is made available under the Apache 2.0 license.
5
+
6
+ Usage
7
+ You can use this model directly with a pipeline for tasks such as text generation and instruction following:
8
+ ```
9
+ from transformers import AutoTokenizer, AutoModelForCausalLM
10
+ import transformers
11
+ import torch
12
+
13
+ model = "cambioml/falcon-7b-8bit"
14
+
15
+ tokenizer = AutoTokenizer.from_pretrained(model)
16
+ pipe = transformers.pipeline(
17
+ "text-generation",
18
+ model=model,
19
+ tokenizer=tokenizer,
20
+ torch_dtype=torch.bfloat16,
21
+ trust_remote_code=True,
22
+ device_map="auto",
23
+ )
24
+ sequences = pipe(
25
+ "Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron:",
26
+ max_length=200,
27
+ do_sample=True,
28
+ top_k=10,
29
+ num_return_sequences=1,
30
+ eos_token_id=tokenizer.eos_token_id,
31
+ )
32
+ for seq in sequences:
33
+ print(f"Result: {seq['generated_text']}")
34
+ ```