Instructions to use CharacterEcho/Rohit-Sharma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CharacterEcho/Rohit-Sharma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CharacterEcho/Rohit-Sharma") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CharacterEcho/Rohit-Sharma") model = AutoModelForCausalLM.from_pretrained("CharacterEcho/Rohit-Sharma") 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]:])) - llama-cpp-python
How to use CharacterEcho/Rohit-Sharma with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="CharacterEcho/Rohit-Sharma", filename="rohit-sharma-iq4_xs-imat.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use CharacterEcho/Rohit-Sharma with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CharacterEcho/Rohit-Sharma:IQ4_XS # Run inference directly in the terminal: llama-cli -hf CharacterEcho/Rohit-Sharma:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf CharacterEcho/Rohit-Sharma:IQ4_XS # Run inference directly in the terminal: llama-cli -hf CharacterEcho/Rohit-Sharma:IQ4_XS
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf CharacterEcho/Rohit-Sharma:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf CharacterEcho/Rohit-Sharma:IQ4_XS
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf CharacterEcho/Rohit-Sharma:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf CharacterEcho/Rohit-Sharma:IQ4_XS
Use Docker
docker model run hf.co/CharacterEcho/Rohit-Sharma:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use CharacterEcho/Rohit-Sharma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CharacterEcho/Rohit-Sharma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharacterEcho/Rohit-Sharma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CharacterEcho/Rohit-Sharma:IQ4_XS
- SGLang
How to use CharacterEcho/Rohit-Sharma with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CharacterEcho/Rohit-Sharma" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharacterEcho/Rohit-Sharma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CharacterEcho/Rohit-Sharma" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharacterEcho/Rohit-Sharma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use CharacterEcho/Rohit-Sharma with Ollama:
ollama run hf.co/CharacterEcho/Rohit-Sharma:IQ4_XS
- Unsloth Studio new
How to use CharacterEcho/Rohit-Sharma with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CharacterEcho/Rohit-Sharma to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CharacterEcho/Rohit-Sharma to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CharacterEcho/Rohit-Sharma to start chatting
- Docker Model Runner
How to use CharacterEcho/Rohit-Sharma with Docker Model Runner:
docker model run hf.co/CharacterEcho/Rohit-Sharma:IQ4_XS
- Lemonade
How to use CharacterEcho/Rohit-Sharma with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull CharacterEcho/Rohit-Sharma:IQ4_XS
Run and chat with the model
lemonade run user.Rohit-Sharma-IQ4_XS
List all available models
lemonade list
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("CharacterEcho/Rohit-Sharma")
model = AutoModelForCausalLM.from_pretrained("CharacterEcho/Rohit-Sharma")
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]:]))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)
- Downloads last month
- 74
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CharacterEcho/Rohit-Sharma") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)