code: def greedy_until(self, prompt: str, until, max_length, temperature):
      toks = [self.tokenizer.bos_id()] + self.tokenizer.encode(prompt)
      start_pos = 0
      for i in range(max_length):
          probs = llama.model(
              Tensor([toks[start_pos:]]), start_pos, temperature
          ).realize()
          probs_np = probs.numpy()
          tok = int(np.random.choice(len(probs_np), p=probs_np))
          start_pos = len(toks)
          toks.append(tok)
  
          if tok == self.tokenizer.eos_id():
              break
          output = self.tokenizer.decode(toks)
          for s in until:
              if output.endswith(s):
                  return output[0 : -len(s)]
      return output
  
file_path: tinygrad/examples/llama.py
imports: from pathlib import Path
  from typing import List
  import sys, argparse, json
  import numpy
  from tinygrad.helpers import Timing, Profiling, getenv, DEBUG, colored
  from tinygrad import Device, GlobalCounters, dtypes, nn
  from tinygrad.tensor import Tensor
  from tinygrad.nn.state import safe_load, torch_load, load_state_dict, get_parameters
  from extra.models.llama import Transformer, convert_from_huggingface
  from sentencepiece import SentencePieceProcessor
label_desc: Use image node_id 3 for calling the LLaMa obj's underlying member method code with example usage: obj.greedy_until(prompt, until, max_length, temperature) and returns: output, output