Views
No views yet
1
2from llama_index.llms.huggingface import HuggingFaceLLM
3llm = HuggingFaceLLM(
4 context_window=4096,
5 max_new_tokens=256,
6 generate_kwargs={"temperature": 0.7, "do_sample": False},
7 tokenizer_name="Mollel/Swahili_Gemma",
8 model_name="Mollel/Swahili_Gemma",
9 device_map="auto",
10 stopping_ids=[50278, 50279, 50277, 1, 0],
11 tokenizer_kwargs={"max_length": 4096},
12 model_kwargs={"torch_dtype": torch.float16}
13)
14