File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
"llama2" : "isenbek/lama-2-7b-chat-hf-local-1" ,
6
6
"llama3" : "meta-llama/Meta-Llama-3-8B" ,
7
7
"llama3:70b" : "meta-llama/Meta-Llama-3-70B" ,
8
+ "llama3.1" :"meta-llama/Meta-Llama-3.1-8B" ,
8
9
"llama3.1:70b" :"meta-llama/Meta-Llama-3.1-70B" ,
9
10
"mistral" : "mistralai/Mistral-Nemo-Instruct-2407"
10
- }
11
+ }
Original file line number Diff line number Diff line change 15
15
from ..helpers import models_tokens
16
16
from ..utils .tokenizer_openai import num_tokens_openai
17
17
from .base_node import BaseNode
18
+ from ..helpers .mappings import translation_hf
18
19
19
20
class ParseNode (BaseNode ):
20
21
"""
@@ -102,7 +103,7 @@ def execute(self, state: dict) -> dict:
102
103
elif isinstance (self .llm_model , ChatMistralAI ):
103
104
print ("mistral" )
104
105
elif isinstance (self .llm_model , ChatOllama ):
105
- tokenizer = AutoTokenizer .from_pretrained ("meta-llama/Meta-Llama-3-8B" )
106
+ tokenizer = AutoTokenizer .from_pretrained (translation_hf [ self . llm_model . split ( "/" )[ - 1 ]] )
106
107
tokens = tokenizer .tokenize (docs_transformed .page_conten )
107
108
num_tokens = len (tokens )
108
109
#google genai
You can’t perform that action at this time.
0 commit comments