Instructions to use VideoGameBunny/VideoGameBunny-V1-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VideoGameBunny/VideoGameBunny-V1-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VideoGameBunny/VideoGameBunny-V1-4B", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("VideoGameBunny/VideoGameBunny-V1-4B", trust_remote_code=True, dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VideoGameBunny/VideoGameBunny-V1-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VideoGameBunny/VideoGameBunny-V1-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VideoGameBunny/VideoGameBunny-V1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VideoGameBunny/VideoGameBunny-V1-4B
- SGLang
How to use VideoGameBunny/VideoGameBunny-V1-4B 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 "VideoGameBunny/VideoGameBunny-V1-4B" \ --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": "VideoGameBunny/VideoGameBunny-V1-4B", "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 "VideoGameBunny/VideoGameBunny-V1-4B" \ --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": "VideoGameBunny/VideoGameBunny-V1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VideoGameBunny/VideoGameBunny-V1-4B with Docker Model Runner:
docker model run hf.co/VideoGameBunny/VideoGameBunny-V1-4B
Missing `configuration_bunny_phi3.py` and `modeling_bunny_phi3.py` files
Hello @VideoGameBunny ,
Thanks for this work!
I would like to load and try this model on my machine but this code:
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("VideoGameBunny/VideoGameBunny-V1-4B", trust_remote_code=True)
leads to:
OSError: VideoGameBunny/VideoGameBunny-V1-4B does not appear to have a file named configuration_bunny_phi3.py. Checkout 'https://huggingface.co/VideoGameBunny/VideoGameBunny-V1-4B/tree/main' for available files
I have tried to download the model with a git clone and use the configuration_bunny_phi3.py and modeling_bunny_phi3.py files from the bunny repo but I got a Pytorch error: "mat1 and mat2 shapes cannot be multiplied (729x1152 and 3456x3072)" when I call model.generate(). I guess that the configuration_bunny_phi3.py and modeling_bunny_phi3.py files have been modified on your side.
Could you please add your configuration_bunny_phi3.py and modeling_bunny_phi3.py files to this repository please?
There is the same issue on the 8B VideoGameBunny model.
Hello @fcouthouis ,
Thank you for your interest in our work. VideoGameBunny is based on Bunny, and to load the weights, you need to use Bunny's codebase. We will release tutorials on how to use the weights shortly.
Thanks for you answer, I'm lokking forward into the tutorials!