ktrapeznikov / gpt2-medium-topic-news

huggingface.co
Total runs: 37
24-hour runs: 0
7-day runs: 5
30-day runs: 7
Model's Last Updated: May 23 2021
text-generation

Introduction of gpt2-medium-topic-news

Model Details of gpt2-medium-topic-news

GPT2-medium-topic-news

Model description

GPT2-medium fine tuned on a large news corpus conditioned on a topic

Intended uses & limitations
How to use

To generate a news article text conditioned on a topic, prompt model with: topic: climate article:

The following tags were used during training: arts law international science business politics disaster world conflict football sport sports artanddesign environment music film lifeandstyle business health commentisfree books technology media education politics travel stage uk society us money culture religion science news tv fashion uk australia cities global childrens sustainable global voluntary housing law local healthcare theguardian

Zero shot generation works pretty well as long as topic is a single word and not too specific.

device = "cuda:0"
tokenizer = AutoTokenizer.from_pretrained("ktrapeznikov/gpt2-medium-topic-news")
model = AutoModelWithLMHead.from_pretrained("ktrapeznikov/gpt2-medium-topic-news")
model.to(device)
topic = "climate"
prompt = tokenizer(f"topic: {topic} article:", return_tensors="pt")
out = model.generate(prompt["input_ids"].to(device), do_sample=True,max_length=500, early_stopping=True, top_p=.9)
print(tokenizer.decode(list(out.cpu()[0])))
Training data
Training procedure

Runs of ktrapeznikov gpt2-medium-topic-news on huggingface.co

37
Total runs
0
24-hour runs
2
3-day runs
5
7-day runs
7
30-day runs

More Information About gpt2-medium-topic-news huggingface.co Model

gpt2-medium-topic-news huggingface.co

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

gpt2-medium-topic-news huggingface.co Url

https://huggingface.co/ktrapeznikov/gpt2-medium-topic-news

ktrapeznikov gpt2-medium-topic-news online free

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

ktrapeznikov gpt2-medium-topic-news online free url in huggingface.co:

https://huggingface.co/ktrapeznikov/gpt2-medium-topic-news

gpt2-medium-topic-news install

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

gpt2-medium-topic-news install url in huggingface.co:

https://huggingface.co/ktrapeznikov/gpt2-medium-topic-news

Url of gpt2-medium-topic-news

gpt2-medium-topic-news huggingface.co Url

Provider of gpt2-medium-topic-news huggingface.co

ktrapeznikov
ORGANIZATIONS

Other API from ktrapeznikov