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) + +