From d64e015d1401ef952a7158a4838fee011aada20e Mon Sep 17 00:00:00 2001 From: Peilin Yu Date: Wed, 13 Sep 2023 14:01:46 -0400 Subject: [PATCH] Set Default Pad Tokens to [EOS], Update requirements.txt --- alfred/fm/huggingface.py | 1 + docs/alfred/fm/vllm.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 docs/alfred/fm/vllm.md diff --git a/alfred/fm/huggingface.py b/alfred/fm/huggingface.py index 54d42bd..a989243 100644 --- a/alfred/fm/huggingface.py +++ b/alfred/fm/huggingface.py @@ -357,6 +357,7 @@ def _generate_batch( inputs = batch else: if padding: + self.tokenizer.pad_token = self.tokenizer.eos_token inputs = self.tokenizer(batch, return_tensors="pt", padding=True) diff --git a/docs/alfred/fm/vllm.md b/docs/alfred/fm/vllm.md new file mode 100644 index 0000000..497417b --- /dev/null +++ b/docs/alfred/fm/vllm.md @@ -0,0 +1,35 @@ +# Vllm + +[Alfred Index](../../README.md#alfred-index) / +[Alfred](../index.md#alfred) / +[Fm](./index.md#fm) / +Vllm + +> Auto-generated documentation for [alfred.fm.vllm](../../../alfred/fm/vllm.py) module. + +- [Vllm](#vllm) + - [vLLMModel](#vllmmodel) + +## vLLMModel + +[Show source in vllm.py:18](../../../alfred/fm/vllm.py#L18) + +vLLMModel wraps a vLLM model. vLLM is a fast and easy-to-use library for LLM inference. + +source: https://github.com/vllm-project/vllm + +#### Signature + +```python +class vLLMModel(LocalAccessFoundationModel): + def __init__( + self, model: str, model_string: str, local_dir: str = None, **kwargs: Any + ): + ... +``` + +#### See also + +- [LocalAccessFoundationModel](./model.md#localaccessfoundationmodel) + +