Instructions to use abertsch/bart-base-govreport with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abertsch/bart-base-govreport with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abertsch/bart-base-govreport")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("abertsch/bart-base-govreport") model = AutoModel.from_pretrained("abertsch/bart-base-govreport") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abertsch/bart-base-govreport with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abertsch/bart-base-govreport" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abertsch/bart-base-govreport", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/abertsch/bart-base-govreport
- SGLang
How to use abertsch/bart-base-govreport with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "abertsch/bart-base-govreport" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abertsch/bart-base-govreport", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "abertsch/bart-base-govreport" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abertsch/bart-base-govreport", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use abertsch/bart-base-govreport with Docker Model Runner:
docker model run hf.co/abertsch/bart-base-govreport
Reproduce the bart-base + test unlimiformer on the gov-report datasets
Hi! I used the model finetuned on the Gov-Report training dataset in this repository to evaluate the RUGUE-2 on validation and test datasets. However, I have not reached the reported results of Table 3 in the paper, 15.3% vs 19.6%. I have found a solution https://github.com/abertsch72/unlimiformer/issues/17, but it still needs to fine-tune the fine-tuned model. I am confused.
Hi, and sorry for the late response-- I didn't know about the discussion feature here :)
If you use the model without cloning the unlimiformer repo and using the --test_unlimiformer argument, it will not use the Unlimiformer method and the results will be lower. The set of arguments that Uri provides in the issue you linked does not finetune the model (It provides some training arguments like learning rate and train batch size, but these are ignored because it does not set do_train=True). If you run with that set of arguments, do you still see a difference in ROUGE from the table?
I used the public github repo and reproduce the results of GovReport and ScreenSumm. However, the result of the BookSum dataset has not been reproduced. Thank you very much.
Thanks for replicating, I appreciate it! Can you share what arguments you used for BookSum and I'll look into this further?