소스 검색

Make sure they're np arrays

Nel Nibcord 8 달 전
부모
커밋
9b66758b59
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      exo/inference/tinygrad/inference.py

+ 1 - 1
exo/inference/tinygrad/inference.py

@@ -75,7 +75,7 @@ class TinygradDynamicShardInferenceEngine(InferenceEngine):
   async def encode(self, shard: Shard, prompt: str):
     await self.ensure_shard(shard)
     tokens = await asyncio.get_running_loop().run_in_executor(self.executor, self.tokenizer.encode, prompt)
-    return tokens
+    return np.array(tokens)
   
   async def decode(self, shard: Shard, tokens):
     await self.ensure_shard(shard)