File size: 1,372 Bytes
6a64c0c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
![Falcon7b8bit.jpg](https://cdn-uploads.huggingface.co/production/uploads/6439639821221ac74117ee31/5eBD58An3E7FE6aumBSGN.jpeg)
# 🚀 Falcon-7B 8-bit Model
This repository is home to the 8-bit of Falcon-7B model, converted from its original model (https://huggingface.co./tiiuae/falcon-7b).
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.
Usage
You can use this model directly with a pipeline for tasks such as text generation and instruction following:
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model = "vivekraina/falcon-7b-8bit"
tokenizer = AutoTokenizer.from_pretrained(model)
pipe = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
trust_remote_code=True
)
sequences = pipe(
"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:",
max_length=200,
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
``` |