Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Nov 23, 2023
1 parent b818cb0 commit 9368d93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flatline_lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, model_name, vocab_size, config: LlamaCppConfig, n_threads: in
self.vocab_size = vocab_size

# self.model = AutoModelForCausalLM.from_pretrained("gpt2")
self.plamo_cpp_model = infer.load_model_from_file(model_name, n_threads)
self.llama_cpp_model = infer.load_model_from_file(model_name, n_threads)

@property
def device(self) -> torch.device:
Expand All @@ -39,7 +39,7 @@ def forward( # type: ignore
input_ids: torch.LongTensor,
**kwargs,
) -> CausalLMOutput:
logits = torch.from_numpy(self.plamo_cpp_model.calc_next_token_logits(
logits = torch.from_numpy(self.llama_cpp_model.calc_next_token_logits(
input_ids.numpy(), self.vocab_size))
return CausalLMOutput(
loss=None,
Expand Down

0 comments on commit 9368d93

Please sign in to comment.