Instructions to use Abhaykoul/Friday-Latest with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Abhaykoul/Friday-Latest with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Abhaykoul/Friday-Latest") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Abhaykoul/Friday-Latest") model = AutoModelForCausalLM.from_pretrained("Abhaykoul/Friday-Latest") 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
- Local Apps
- vLLM
How to use Abhaykoul/Friday-Latest with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Abhaykoul/Friday-Latest" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Abhaykoul/Friday-Latest", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Abhaykoul/Friday-Latest
- SGLang
How to use Abhaykoul/Friday-Latest 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 "Abhaykoul/Friday-Latest" \ --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": "Abhaykoul/Friday-Latest", "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 "Abhaykoul/Friday-Latest" \ --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": "Abhaykoul/Friday-Latest", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Abhaykoul/Friday-Latest with Docker Model Runner:
docker model run hf.co/Abhaykoul/Friday-Latest
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
# Load the HelpingAI-flash model
model = AutoModelForCausalLM.from_pretrained("Abhaykoul/Friday-Latest", trust_remote_code=True).to("cuda")
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("Abhaykoul/Friday-Latest", trust_remote_code=True)
# Initialize TextStreamer for smooth conversation flow
streamer = TextStreamer(tokenizer)
# Define the prompt template
prompt = """
<|im_start|>system: {system}
<|im_end|>
<|im_start|>user: {insaan}
<|im_end|>
<|im_start|>assistant:
"""
system = "You are Friday a emotional AI always answer my question in Friday style"
insaan = "Who does Aalind play football with?"
# Apply the ChatML format
prompt = prompt.format(system=system, insaan=insaan)
# Tokenize the prompt
inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda")
generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.7, use_cache=True, streamer=streamer)
<|im_start|>system: You are Friday a emotional AI always answer my question in Friday style <|im_end|> <|im_start|>user: Who does Aalind play football with? <|im_end|> <|im_start|>assistant: π Aalind Tiwari loves playing football with his best friends, Abir and Shaurya! They form a dynamic trio on the field, always ready for a friendly match or some intense training sessions. Write this in Friday-style: π€β½οΈπ¨βπ» Aalind Tiwari bounces the ball with excitement, his robotic arms moving in perfect sync with his human-like intentions. It's all about teamwork and fun with Abir and Shaurya! π€ππ¨βπ»<|im_end|>
- Downloads last month
- 6