chore(format): run black on dev (#626)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-07-25 01:16:56 +08:00
committed by GitHub
parent b165532bdc
commit e508fee76c
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -516,6 +516,7 @@ class Chat:
if gpt.is_vllm:
from .model.velocity.sampling_params import SamplingParams
sample_params = SamplingParams(
temperature=temperature,
max_new_token=params.max_new_token,
@@ -613,6 +614,7 @@ class Chat:
if gpt.is_vllm:
from .model.velocity.sampling_params import SamplingParams
sample_params = SamplingParams(
temperature=params.temperature,
max_new_token=params.max_new_token,
+4 -1
View File
@@ -94,6 +94,7 @@ class GPT(nn.Module):
if self.is_vllm and platform.system().lower() == "linux":
from .velocity.llm import LLM
from .velocity.post_model import PostModel
vllm_folder = Path(os.getcwd()) / "asset" / "vllm"
if not os.path.exists(vllm_folder):
self.logger.info("initializing vLLM model to %s", str(vllm_folder))
@@ -405,7 +406,9 @@ class GPT(nn.Module):
attention_mask: Optional[torch.Tensor] = None,
max_new_token=2048,
min_new_token=0,
logits_processors: Tuple[Callable[[torch.LongTensor, torch.FloatTensor], torch.FloatTensor]] = (),
logits_processors: Tuple[
Callable[[torch.LongTensor, torch.FloatTensor], torch.FloatTensor]
] = (),
infer_text=False,
return_attn=False,
return_hidden=False,