falcon-7b-8bit / README.md
vivekraina's picture
Create README.md
c5b2a0c

Falcon7b8bit.jpg

πŸš€ 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:

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']}")