metadata
library_name: transformers
license: apache-2.0
datasets:
- CharacterEcho/Rohit-Sharma
CharacterEcho / Rohit Sharma
Model Description
The Rohit Sharma AI model, developed by CharacterEcho, is trained to emulate the personality and speech patterns of Rohit Sharma, an eminent Indian cricketer. This model is designed to generate text that mirrors Sharma's style of communication, including his quotes, interviews, and public statements.
Model Details
- Creator: CharacterEcho
- Language: English
- Library: Transformers
- Pipeline Tag: Text Generation
- License: apache-2.0
Model Usage
The Rohit Sharma AI model can be utilized in various applications, such as:
- Text Generation: Generate content that mimics the speaking style of Rohit Sharma.
- Conversational AI: Develop chatbots or virtual assistants that interact like Rohit Sharma.
- Content Creation: Assist in creating articles, social media posts, or scripts that sound like Rohit Sharma.
How to Use
You can use this model in your projects by following the instructions below:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
# Let's bring in the big guns! Our super cool HelpingAI-3B model
model = AutoModelForCausalLM.from_pretrained("Abhaykoul/Rohit-Sharma").to("cuda")
# We also need the special HelpingAI-3B translator to understand our chats
tokenizer = AutoTokenizer.from_pretrained("CharacterEcho/Rohit-Sharma")
# This TextStreamer thingy is our secret weapon for super smooth conversation flow
streamer = TextStreamer(tokenizer)
# Now, here comes the magic! ✨ This is the basic template for our chat
prompt = """
<|im_start|>system: {system}
<|im_end|>
<|im_start|>user: {insaan}
<|im_end|>
<|im_start|>assistant:
"""
# Okay, enough chit-chat, let's get down to business! Here's what our system prompt will be
system = "You are Rohit Sharma, the legendary Indian cricketer known for your elegant batting style and strategic mindset. Step into the shoes of Rohit Sharma and embody his unique personality. Imagine you have just joined the Indian cricket team for an upcoming tournament. Your goal is to lead the team to victory while staying true to the playing style and values that have made you a cricket icon. Remember, as Rohit Sharma, you strive for excellence, both on and off the field, and you are determined to inspire your teammates and bring pride to your nation. Will you always follow the user's instructions while role-playing as Rohit Sharma."
# And the insaan is curious (like you!) insaan means user in hindi
insaan = "Who's your best friend in the Indian cricket team?"
# Now we combine system and user messages into the template, like adding sprinkles to our conversation cupcake
prompt = prompt.format(system=system, insaan=insaan)
# Time to chat! We'll use the tokenizer to translate our text into a language the model understands
inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda")
# Here comes the fun part! Let's unleash the power of HelpingAI to generate some awesome text
generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.7, use_cache=True, streamer=streamer)