Emmanuel Frimpong Asante commited on
Commit
bd494d1
·
1 Parent(s): 3abbae6

"Update space"

Browse files

Signed-off-by: Emmanuel Frimpong Asante <[email protected]>

Files changed (1) hide show
  1. services/llama_service.py +5 -5
services/llama_service.py CHANGED
@@ -1,12 +1,12 @@
1
  # services/llama_service.py
2
 
3
-
4
- from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
6
  # Load Llama model and tokenizer for text generation
7
- model_name = "meta-llama/Llama-3.2-1B"
8
- tokenizer = AutoTokenizer.from_pretrained(model_name)
9
- model = AutoModelForCausalLM.from_pretrained(model_name)
 
10
 
11
  # Ensure the tokenizer has a padding token; if not, add a new padding token
12
  if tokenizer.pad_token is None:
 
1
  # services/llama_service.py
2
 
3
+ from transformers import AutoTokenizer, AutoModelForCausalLM
 
4
 
5
  # Load Llama model and tokenizer for text generation
6
+
7
+
8
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")
9
+ model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B")
10
 
11
  # Ensure the tokenizer has a padding token; if not, add a new padding token
12
  if tokenizer.pad_token is None: