Преглед изворни кода

add redundant temp and top_p to dummy inference engine

Alex Cheema пре 8 месеци
родитељ
комит
832e605219
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      exo/inference/dummy_inference_engine.py

+ 1 - 1
exo/inference/dummy_inference_engine.py

@@ -18,7 +18,7 @@ class DummyInferenceEngine(InferenceEngine):
   async def encode(self, shard: Shard, prompt: str) -> np.ndarray:
     return np.array(self.tokenizer.encode(prompt))
   
-  async def sample(self, x: np.ndarray) -> np.ndarray:
+  async def sample(self, x: np.ndarray, temp: float = 0.0, top_p: float = 1.0) -> np.ndarray:
     if x[0] > self.num_generate_dummy_tokens: return np.array([self.tokenizer.eos_token_id])
     return x