LVKinyanjui commited on
Commit
f1ab738
1 Parent(s): e13715a

Added some code and dependencies for the huggingface model

Browse files
Files changed (3) hide show
  1. examples/llm.py +9 -0
  2. requirements.txt +2 -0
  3. uploaded_file.pdf +0 -0
examples/llm.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import transformers
2
+ import torch
3
+
4
+ model_id = "meta-llama/Meta-Llama-3-8B"
5
+
6
+ pipeline = transformers.pipeline(
7
+ "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
8
+ )
9
+ pipeline("Hey how are you doing today?")
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  chromadb==0.5.5
2
  pymupdf==1.24.9
3
  streamlit==1.38.0
 
 
 
1
  chromadb==0.5.5
2
  pymupdf==1.24.9
3
  streamlit==1.38.0
4
+ transformers
5
+ torch
uploaded_file.pdf DELETED
Binary file (532 kB)