Downloads · 30 days
9
28% of all-time downloads
Watheq/d2q_monoELECTRA_1400
d2q_monoELECTRA_1400 is a machine learning model from Watheq. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is TRL language model and is a part of a study explained here on document expansion using Doc2Query. The model has been fine-tuned with reinforcement learning to guide the model outputs according to a value…
Downloads · 30 days
9
28% of all-time downloads
All-time downloads
32
Public
Parameters
223M
892 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors892 MB · 100%
From the Hugging Face model README
This model is TRL language model and is a part of a study explained here on document expansion using Doc2Query. The model has been fine-tuned with reinforcement learning to guide the model outputs according to a value, function, or human feedback. The model can be used for text generation. Please cite the paper below if you use it.
To use this model for inference, first install the TRL library:
pip install trl
You can then generate text as follows:
from transformers import pipeline
generator = pipeline("text-generation", model="watheq/d2q_monoELECTRA_1400")
outputs = generator("Coffee is a beverage brewed from roasted coffee beans. Coffee has a stimulating effect on humans, primarily due to its caffeine content.")
If you want to use the model for training or to obtain the outputs from the value head, load the model as follows:
from transformers import AutoTokenizer
from trl import AutoModelForCausalLMWithValueHead
tokenizer = AutoTokenizer.from_pretrained("watheq/d2q_monoELECTRA_1400")
model = AutoModelForCausalLMWithValueHead.from_pretrained("watheq/d2q_monoELECTRA_1400")
inputs = tokenizer("Coffee is a beverage brewed from roasted coffee beans. Coffee has a stimulating effect on humans, primarily due to its caffeine content.", return_tensors="pt")
outputs = model(**inputs, labels=inputs["input_ids"])
If you used any piece of this repository, please consider citing our work :
@inproceedings{mansour2024revisit,
title={Revisiting Document Expansion and Filtering for Effective First-Stage Retrieval},
author={Mansour, Watheq and Zhuang, Shengyao and Zhuang, Guido and Mackenzie, Joel},
booktitle = {Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval},
year={2024},
publisher = {Association for Computing Machinery},
series = {SIGIR '24}
}