Skip to content

Commit

Permalink
vLLM notebook updates
Browse files Browse the repository at this point in the history
  • Loading branch information
noamgat committed Oct 18, 2023
1 parent b7b88eb commit 8e5ca65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ print(result)

## Capabilities / Advantages

- Works with any Python language model and tokenizer. Already supports transformers, [LangChain](https://docs.langchain.com/docs/) and [vLLM](https://github.com/vllm-project/vllm). Can be adapted to others.
- Works with any Python language model and tokenizer. Already supports transformers, [LangChain](https://docs.langchain.com/docs/) and [vLLM](https://github.com/noamgat/lm-format-enforcer/blob/main/samples/colab_vllm_integration.ipynb). Can be adapted to others.
- Supports batched generation and beam searches - each input / beam can have different tokens filtered at every timestep
- Supports both JSON Schema and Regular Expression formats
- Supports both required and optional fields in JSON schemas
Expand Down
16 changes: 8 additions & 8 deletions samples/colab_vllm_integration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
"metadata": {},
"outputs": [],
"source": [
"# !pip install vllm lm-format-enforcer\n",
"# !huggingface-cli login\n",
"!pip install vllm lm-format-enforcer\n",
"!huggingface-cli login\n",
"\n",
"# When running from source / developing the library, use this instead\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
"import sys\n",
"import os\n",
"sys.path.append(os.path.abspath('..'))\n",
"# os.environ['CUDA_LAUNCH_BLOCKING'] = '1'"
"# %load_ext autoreload\n",
"# %autoreload 2\n",
"# import sys\n",
"# import os\n",
"# sys.path.append(os.path.abspath('..'))\n",
"## os.environ['CUDA_LAUNCH_BLOCKING'] = '1'"
]
},
{
Expand Down

0 comments on commit 8e5ca65

Please sign in to comment.