Skip to content

Commit

Permalink
Merge pull request #47 from BatsResearch/default-pad-token
Browse files Browse the repository at this point in the history
Set Default Pad Tokens to [EOS], Update requirements.txt
  • Loading branch information
dotpyu authored Sep 13, 2023
2 parents 66f767d + d64e015 commit 1bec1d6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions alfred/fm/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
35 changes: 35 additions & 0 deletions docs/alfred/fm/vllm.md
Original file line number Diff line number Diff line change
@@ -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)


0 comments on commit 1bec1d6

Please sign in to comment.