animan123 commited on
Commit
0c10674
·
1 Parent(s): ff14b75

fix default top-k

Browse files
cube/cube3d/inference/engine.py CHANGED
@@ -266,7 +266,7 @@ class Engine:
266
  guidance_scale: float = 3.0,
267
  resolution_base: float = 8.0,
268
  chunk_size: int = 100_000,
269
- top_k: int = 5,
270
  ):
271
  """
272
  Generates a 3D mesh from text prompts using a GPT model and shape decoder.
 
266
  guidance_scale: float = 3.0,
267
  resolution_base: float = 8.0,
268
  chunk_size: int = 100_000,
269
+ top_k: int = 1,
270
  ):
271
  """
272
  Generates a 3D mesh from text prompts using a GPT model and shape decoder.
cube/cube3d/inference/logits_postprocesses.py CHANGED
@@ -10,7 +10,6 @@ def top_k_filtering(logits, top_k: int = 1):
10
  Args:
11
  logits: A tensor of logits to be filtered. Expected shape is [..., vocab_size].
12
  top_k: If > 0, only keep the top k tokens with highest probability.
13
- top_p: If < 1.0, only keep tokens whose cumulative probability is below this threshold.
14
 
15
  Returns:
16
  A tensor of logits where values outside the top-k/top-p threshold are set to -∞.
 
10
  Args:
11
  logits: A tensor of logits to be filtered. Expected shape is [..., vocab_size].
12
  top_k: If > 0, only keep the top k tokens with highest probability.
 
13
 
14
  Returns:
15
  A tensor of logits where values outside the top-k/top-p threshold are set to -∞.