Spaces:
Runtime error
Runtime error
Update models/llamaCustom.py
Browse files35 unmodified lines36373839404142434445464723 unmodified lines717273747576772 unmodified lines80818283848535 unmodified lines# set maximum chunk overlapCHUNK_OVERLAP_RATION = 0.2prompt_helper = PromptHelper(context_window=CONTEXT_WINDOW,num_output=NUM_OUTPUT,chunk_overlap_ratio=CHUNK_OVERLAP_RATION,)llm_model_name = "bigscience/bloom-560m"tokenizer = AutoTokenizer.from_pretrained(llm_model_name)model = AutoModelForCausalLM.from_pretrained(llm_model_name, config="T5Config")23 unmodified lines@propertydef _identifying_params(self) -> Mapping[str, Any]:return {"name_of_model": self.model_name}@propertydef _llm_type(self) -> str:2 unmodified lines@st.cache_resourceclass LlamaCustom:# define llmllm_predictor = LLMPredictor(llm=CustomLLM())service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper35 unmodified lines36373839404123 unmodified lines656667686970712 unmodified lines747576777879808182838435 unmodified lines# set maximum chunk overlapCHUNK_OVERLAP_RATION = 0.2llm_model_name = "bigscience/bloom-560m"tokenizer = AutoTokenizer.from_pretrained(llm_model_name)model = AutoModelForCausalLM.from_pretrained(llm_model_name, config="T5Config")23 unmodified lines@propertydef _identifying_params(self) -> Mapping[str, Any]:return {"name_of_model": llm_model_name}@propertydef _llm_type(self) -> str:2 unmodified lines@st.cache_resourceclass LlamaCustom:# define llmprompt_helper = PromptHelper(context_window=CONTEXT_WINDOW,num_output=NUM_OUTPUT,chunk_overlap_ratio=CHUNK_OVERLAP_RATION,)llm_predictor = LLMPredictor(llm=CustomLLM())service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper
models/llamaCustom.py+6-7