How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "neulab/gpt2-finetuned-wikitext103"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "neulab/gpt2-finetuned-wikitext103",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Use Docker
docker model run hf.co/neulab/gpt2-finetuned-wikitext103
Quick Links

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

This is a gpt2 model, finetuned on the Wikitext-103 dataset.

It achieves a perplexity of 14.84 using a "sliding window" context, using the run_clm.py script at https://github.com/neulab/knn-transformers.

Base LM: distilgpt2 gpt2
base perplexity 18.25 14.84
+kNN-LM 15.03 12.57
+RetoMaton 14.70 12.46

This model was released as part of the paper "Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval" (ICML'2022).

For more information, see: https://github.com/neulab/knn-transformers

If you use this model, please cite:

@inproceedings{alon2022neuro,
  title={Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval},
  author={Alon, Uri and Xu, Frank and He, Junxian and Sengupta, Sudipta and Roth, Dan and Neubig, Graham},
  booktitle={International Conference on Machine Learning},
  pages={468--485},
  year={2022},
  organization={PMLR}
}
Downloads last month
309
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for neulab/gpt2-finetuned-wikitext103