Instructions to use AryavA/FunnyPhi-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AryavA/FunnyPhi-4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AryavA/FunnyPhi-4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AryavA/FunnyPhi-4") model = AutoModelForCausalLM.from_pretrained("AryavA/FunnyPhi-4") 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 Settings
- vLLM
How to use AryavA/FunnyPhi-4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AryavA/FunnyPhi-4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AryavA/FunnyPhi-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AryavA/FunnyPhi-4
- SGLang
How to use AryavA/FunnyPhi-4 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 "AryavA/FunnyPhi-4" \ --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": "AryavA/FunnyPhi-4", "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 "AryavA/FunnyPhi-4" \ --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": "AryavA/FunnyPhi-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AryavA/FunnyPhi-4 with Docker Model Runner:
docker model run hf.co/AryavA/FunnyPhi-4
FunnyPhi-4
What is this?
Obviously this is an LLM, but yeah, funny...
it can:
- Message each message as it's a joke.
- Explode your tummy
- And forget it's name
Basically, it’s like if Phi-4 went to a comedy club and came back as a legend.
Installation(Installing requirements)
pip install -U transformers
I know that is a very lengthy command, it's okay, just copy and past it there...
Running the model
This model requires alot of compute, likely you need to own 10^infinity VRAM. Just joking, this is a 15B parameter model, now breathe, you're safe...
from transformers import pipeline # Load modules
pipe = pipeline("text-generation", model="AryavA/FunnyPhi-4") # Load the model
messages = [{"role":"user", "content":"Who are you?"}] # Setting the messages in a variable called umm, yeah, messages.
print(pipe(messages)) # Generating and printing output.
Note that this code is very lengthy, and needs professionals to type this out, but I used very little comments so you can understand this code.
Use FunnyPhi-4 responsibly. Too much laughter may cause heavy stomach pains.
If it forgets its name, just finetune it.
Contributions are welcome, especially memes or jokes about pizza or Python errors.
License & Attribution
- Base Model: Phi-4 (MIT License)
- Fine-tune License: MIT (same as base model)
- Additional Training Data: This model was fine-tuned on a mixture of custom text and some outputs generated by LLaMA 3.2. These outputs were used as part of the training data to improve humor style.
- The model itself does NOT include LLaMA weights or code.
- LLaMA outputs are licensed under Meta’s LLaMA 3.2 terms of use.
Please use this model responsibly and check the licenses of any datasets or upstream models used in your own work.
- Downloads last month
- 3
Model tree for AryavA/FunnyPhi-4
Base model
microsoft/phi-4