Salesforce / mixqg-3b

huggingface.co
Total runs: 250
24-hour runs: 0
7-day runs: 1
30-day runs: -278
Model's Last Updated: January 15 2025
text-generation

Introduction of mixqg-3b

Model Details of mixqg-3b

MixQG (3b-sized model)

MixQG is a new question generation model pre-trained on a collection of QA datasets with a mix of answer types. It was introduced in the paper MixQG: Neural Question Generation with Mixed Answer Types and the associated code is released in this repository.

How to use

Using Huggingface pipeline abstraction:

from transformers import pipeline

nlp = pipeline("text2text-generation", model='Salesforce/mixqg-3b', tokenizer='Salesforce/mixqg-3b')
    
CONTEXT = "In the late 17th century, Robert Boyle proved that air is necessary for combustion."
ANSWER = "Robert Boyle"

def format_inputs(context: str, answer: str):
    return f"{answer} \\n {context}"

text = format_inputs(CONTEXT, ANSWER)

nlp(text)
# should output [{'generated_text': 'Who proved that air is necessary for combustion?'}]

Using the pre-trained model directly:

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained('Salesforce/mixqg-3b')
model = AutoModelForSeq2SeqLM.from_pretrained('Salesforce/mixqg-3b')

CONTEXT = "In the late 17th century, Robert Boyle proved that air is necessary for combustion."
ANSWER = "Robert Boyle"

def format_inputs(context: str, answer: str):
    return f"{answer} \\n {context}"
    
text = format_inputs(CONTEXT, ANSWER)

input_ids = tokenizer(text, return_tensors="pt").input_ids
generated_ids = model.generate(input_ids, max_length=32, num_beams=4)
output = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
print(output)
# should output "Who proved that air is necessary for combustion?"
Citation
@misc{murakhovska2021mixqg,
      title={MixQG: Neural Question Generation with Mixed Answer Types}, 
      author={Lidiya Murakhovs'ka and Chien-Sheng Wu and Tong Niu and Wenhao Liu and Caiming Xiong},
      year={2021},
      eprint={2110.08175},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Runs of Salesforce mixqg-3b on huggingface.co

250
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
-278
30-day runs

More Information About mixqg-3b huggingface.co Model

mixqg-3b huggingface.co

mixqg-3b huggingface.co is an AI model on huggingface.co that provides mixqg-3b's model effect (), which can be used instantly with this Salesforce mixqg-3b model. huggingface.co supports a free trial of the mixqg-3b model, and also provides paid use of the mixqg-3b. Support call mixqg-3b model through api, including Node.js, Python, http.

Salesforce mixqg-3b online free

mixqg-3b huggingface.co is an online trial and call api platform, which integrates mixqg-3b's modeling effects, including api services, and provides a free online trial of mixqg-3b, you can try mixqg-3b online for free by clicking the link below.

Salesforce mixqg-3b online free url in huggingface.co:

https://huggingface.co/Salesforce/mixqg-3b

mixqg-3b install

mixqg-3b is an open source model from GitHub that offers a free installation service, and any user can find mixqg-3b on GitHub to install. At the same time, huggingface.co provides the effect of mixqg-3b install, users can directly use mixqg-3b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mixqg-3b install url in huggingface.co:

https://huggingface.co/Salesforce/mixqg-3b

Url of mixqg-3b

Provider of mixqg-3b huggingface.co

Salesforce
ORGANIZATIONS

Other API from Salesforce

huggingface.co

Total runs: 80.1K
Run Growth: 80.0K
Growth Rate: 99.89%
Updated:April 12 2025
huggingface.co

Total runs: 29.6K
Run Growth: -93.1K
Growth Rate: -314.65%
Updated:February 03 2025
huggingface.co

Total runs: 566
Run Growth: -1000
Growth Rate: -176.68%
Updated:January 21 2025
huggingface.co

Total runs: 213
Run Growth: -23
Growth Rate: -10.80%
Updated:January 21 2025
huggingface.co

Total runs: 172
Run Growth: 27
Growth Rate: 15.70%
Updated:October 04 2025
huggingface.co

Total runs: 150
Run Growth: -3
Growth Rate: -2.00%
Updated:November 05 2025