Spaces:
Sleeping
Sleeping
Download examples/techniques/llama3.py from LVKinyanjui/QueryYourDocs: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/spaces/LVKinyanjui/QueryYourDocs/resolve/main/examples/techniques/llama3.py
- Command line
-
hf download hf://spaces/LVKinyanjui/QueryYourDocs/examples/techniques/llama3.py
-
curl -L -o llama3.py https://huggingface.co/spaces/LVKinyanjui/QueryYourDocs/resolve/main/examples/techniques/llama3.py
257 Bytes
| import transformers | |
| import torch | |
| model_id = "meta-llama/Meta-Llama-3.1-8B" | |
| pipeline = transformers.pipeline( | |
| "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto" | |
| ) | |
| pipeline("Hey how are you doing today?") | |