Edit model card

Model Trained Using AutoTrain

This model was trained using AutoTrain. For more information, please visit AutoTrain.

#dataset used for custom training is : timdettmers/openassistant-guanaco

Usage


from transformers import GPT2Tokenizer, GPT2LMHeadModel

# Load the fine-tuned model and tokenizer from the Hugging Face Model Hub
model_name = "kr-manish/gpt2-autotrain-finetuned-vff"
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name)

# Input text
input_text = "what is generative ai?"

# Tokenize input text
input_ids = tokenizer.encode(input_text, return_tensors="pt")

# Generate output text
output = model.generate(input_ids, max_length=100, num_return_sequences=1, do_sample=True)

# Decode and print output
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)

#what is generative ai?### Assistant: Generative AI is a powerful, but simple approach to problem-solving that involves generating patterns and graphs involving inputs, outputs, and decisiones. It involves the use of the pre-trained model "intelligence algorithms" to analyze the input data to make predictions that can be influenced by future data usage and other constraints. As a general rule, generative models can be fine-tuned to specific

Usage


#to get response in othet language set "src_lang"
#example: src_lang="en"

from transformers import GPT2Tokenizer, GPT2LMHeadModel

# Load the fine-tuned model and tokenizer from the Hugging Face Model Hub
model_name = "kr-manish/gpt2-autotrain-finetuned-vff"
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name)

# Input text
input_text = "explain the difference between GAN and generative ai?"

# Tokenize input text
input_ids = tokenizer.encode(input_text, return_tensors="pt")

# Generate output text
output = model.generate(input_ids, max_length=100, num_return_sequences=1, do_sample=True)

# Decode and print output
generated_text = tokenizer.decode(output[0], skip_special_tokens=True, src_lang="en")
print(generated_text)

#explain the difference between GAN and generative ai?### Assistant: GAN is a deep learning model that uses neural networks to learn natural language and generate text. Generative ai works by training the model on a set of natural tasks, such as recognizing faces or playing games, to generate a complete model of language. GAN trains on two inputs: a set of tokens for words and input images into a GAN tree, which represents the learning process. GAN then trains on

Downloads last month
1
Safetensors
Model size
124M params
Tensor type
F32
·