Model Card for Model ID
Model Details
Model Description
This model is a quantized version of Falcon2-11B by
tiiuae. Quantization was performed with Auto-GPTQ to 4bit.
- Developed by: TIIIUAE
- Quantised by: Michael Svendsen
Getting Started
1from transformers import AutoTokenizer, AutoModelForCausalLM, GPTQConfig
2
3pretrained_model_name = "thesven/falcon-11B-GPTQ-4bit"
4device = "cuda:0"
5
6# Load the tokenizer
7tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name)
8
9# Load the model with the specified configuration and move to device
10model = AutoModelForCausalLM.from_pretrained(
11 pretrained_model_name,
12 device_map="auto",
13)
14# Set EOS token ID
15model.eos_token_id = tokenizer.eos_token_id
16
17# Move model to the specified device
18model.to(device)
19
20# Define the input text
21input_text = "Why is the sky blue?"
22
23# Encode the input text
24input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
25
26# Generate output
27output = model.generate(input_ids, max_length=1000)
28
29# Decode the generated output
30decoded_output = tokenizer.batch_decode(output, skip_special_tokens=True)
31
32# Print the decoded output
33for i, sequence in enumerate(decoded_output):
34 print(f"Generated Sequence {i+1}: {sequence}")
35
36
License
Falcon2-11B is licenced under [TII Falcon License 2.0(
https://falconllm-staging.tii.ae/falcon-2-terms-and-conditions.html), the permissive Apache 2.0-based software license which includes an acceptable use policy that promotes the responsible use of AI.
Uses
Direct Use
Research on large language models; as a foundation for further specialization and finetuning for specific usecases (e.g., summarization, text generation, chatbot, etc.)
Out-of-Scope Use
Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.
Bias, Risks, and Limitations
Falcon2-11B is trained mostly on English, but also German, Spanish, French, Italian, Portuguese, Polish, Dutch, Romanian, Czech, Swedish. It will not generalize appropriately to other languages. Furthermore, as it is trained on a large-scale corpora representative of the web, it will carry the stereotypes and biases commonly encountered online.
Recommendations
We recommend users of Falcon2-11B to consider finetuning it for the specific set of tasks of interest, and for guardrails and appropriate precautions to be taken for any production use.