Question Answering
Transformers
Safetensors
English
gpt2
text-generation
conversational
anwgpt
anw
text-generation-inference
Instructions to use SubhrajitSain/anwgpt3-355m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SubhrajitSain/anwgpt3-355m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="SubhrajitSain/anwgpt3-355m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SubhrajitSain/anwgpt3-355m") model = AutoModelForCausalLM.from_pretrained("SubhrajitSain/anwgpt3-355m") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
File too large to display, you can check the raw version instead.