Skip to content

Commit

Permalink
context_depth only even
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonBohdan committed Jan 15, 2024
1 parent ac5f2d9 commit a062eec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions neon_llm_palm2/palm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@ class Palm2(NeonLLM):
def __init__(self, config):
super().__init__(config)
self._embedding = None
self._context_depth = 0

self.role = config["role"]
self.context_depth = config["context_depth"]
self.max_tokens = config["max_tokens"]
self.api_key_path = config["key_path"]
self.warmup()

@property
def context_depth(self):
return self._context_depth

@context_depth.setter
def context_depth(self, value):
self._context_depth = value + value % 2

@property
def tokenizer(self) -> None:
return self._tokenizer
Expand Down

0 comments on commit a062eec

Please sign in to comment.