Falcon-RW-1B-Chat is a conversational model with 1 billion parameters. It's a further refinement of the
Falcon-RW-1B-Instruct-OpenOrca, trained on selected data from the
HuggingFaceH4/ultrachat_200k and
openchat/openchat_sharegpt4_dataset datasets.
The underlying Falcon-RW-1B-Instruct-OpenOrca model is built on the
Falcon-RW-1B, a causal decoder-only model. It has been instruction-finetuned using the
Open-Orca/SlimOrca dataset.
The Falcon-RW-1B-Chat aims to add conversational capabilities to the Falcon-RW-1B-Instruct-OpenOrca model. This initiative is driven by the need for a smaller, open-source, instruction-finetuned, ready-to-use model, suitable for users with limited computational resources, like lower-end consumer GPUs.
Detailed results can be found
here
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_name = "ericzzz/falcon-rw-1b-chat"
5
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name, device_map="auto", torch_dtype=torch.bfloat16
9)
10
11chat_history = [
12 {"role": "user", "content": "Hello!"},
13 {"role": "assistant", "content": "Hello! How can I assist you today?"},
14 {"role": "user", "content": "Explain what AI is."},
15]
16
17input_ids = tokenizer.apply_chat_template(
18 chat_history, tokenize=True, add_generation_prompt=True, return_tensors="pt"
19).to(model.device)
20output_tokens = model.generate(
21 input_ids,
22 do_sample=True,
23 temperature=0.7,
24 repetition_penalty=1.05,
25 max_new_tokens=200,
26)
27output_text = tokenizer.decode(
28 output_tokens[0][len(input_ids[0]) :], skip_special_tokens=True
29)
30
31print(output_text)
This model may generate inaccurate or misleading information and is prone to hallucination, creating plausible but false narratives. It lacks the ability to discern factual content from fiction and may inadvertently produce biased, harmful or offensive content. Its understanding of complex, nuanced queries is limited. Users should be aware of this and verify any information obtained from the model.
The model is provided 'as is' without any warranties, and the creators are not liable for any damages arising from its use. Users are responsible for their interactions with the model.
For further inquiries or feedback, please contact at
eric.fu96@aol.com.