Update README.md
Browse files
README.md
CHANGED
@@ -29,9 +29,7 @@ The following models were included in the merge:
|
|
29 |
|
30 |
The following YAML configuration was used to produce this model:
|
31 |
|
32 |
-
|
33 |
```yaml
|
34 |
-
|
35 |
slices:
|
36 |
- sources:
|
37 |
- model: tiiuae/falcon-11B
|
@@ -47,6 +45,36 @@ dtype: bfloat16
|
|
47 |
|
48 |
![Layer Similarity Plot](https://cdn-uploads.huggingface.co/production/uploads/660c0a02cf274b3ab77dd6b7/qO1JQv2NN-dKXYTwU_lTl.png)
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
## Direct Use
|
51 |
Research on large language models; as a foundation for further specialization and finetuning for specific usecases (e.g., summarization, text generation, chatbot, etc.)
|
52 |
|
|
|
29 |
|
30 |
The following YAML configuration was used to produce this model:
|
31 |
|
|
|
32 |
```yaml
|
|
|
33 |
slices:
|
34 |
- sources:
|
35 |
- model: tiiuae/falcon-11B
|
|
|
45 |
|
46 |
![Layer Similarity Plot](https://cdn-uploads.huggingface.co/production/uploads/660c0a02cf274b3ab77dd6b7/qO1JQv2NN-dKXYTwU_lTl.png)
|
47 |
|
48 |
+
```python
|
49 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
50 |
+
import transformers
|
51 |
+
import torch
|
52 |
+
|
53 |
+
model = "ssmits/Falcon2-5.5B-Norwegian"
|
54 |
+
|
55 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
56 |
+
pipeline = transformers.pipeline(
|
57 |
+
"text-generation",
|
58 |
+
model=model,
|
59 |
+
tokenizer=tokenizer,
|
60 |
+
torch_dtype=torch.bfloat16,
|
61 |
+
)
|
62 |
+
sequences = pipeline(
|
63 |
+
"Can you explain the concepts of Quantum Computing?",
|
64 |
+
max_length=200,
|
65 |
+
do_sample=True,
|
66 |
+
top_k=10,
|
67 |
+
num_return_sequences=1,
|
68 |
+
eos_token_id=tokenizer.eos_token_id,
|
69 |
+
)
|
70 |
+
for seq in sequences:
|
71 |
+
print(f"Result: {seq['generated_text']}")
|
72 |
+
```
|
73 |
+
|
74 |
+
💥 **Falcon LLMs require PyTorch 2.0 for use with `transformers`!**
|
75 |
+
|
76 |
+
For fast inference with Falcon, check-out [Text Generation Inference](https://github.com/huggingface/text-generation-inference)! Read more in this [blogpost]((https://huggingface.co/blog/falcon).
|
77 |
+
|
78 |
## Direct Use
|
79 |
Research on large language models; as a foundation for further specialization and finetuning for specific usecases (e.g., summarization, text generation, chatbot, etc.)
|
80 |
|