Spaces:
Sleeping
Sleeping
float16 for cuda
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
"""
|
7 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
8 |
"""
|
9 |
-
pipe = transformers.pipeline("text-generation", "HuggingFaceTB/SmolLM-
|
10 |
outlines_tokenizer = outlines.models.TransformerTokenizer(pipe.tokenizer)
|
11 |
|
12 |
### TODO 1: use outliunes with a transformer model made directly
|
|
|
6 |
"""
|
7 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
8 |
"""
|
9 |
+
pipe = transformers.pipeline("text-generation", "HuggingFaceTB/SmolLM-1.7B-Instruct", torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32)
|
10 |
outlines_tokenizer = outlines.models.TransformerTokenizer(pipe.tokenizer)
|
11 |
|
12 |
### TODO 1: use outliunes with a transformer model made directly
|