Text Generation
Transformers
PyTorch
Safetensors
GGUF
phi
axolotl
Generated from Trainer
conversational
custom_code
text-generation-inference
Instructions to use justinj92/phi2-bunny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use justinj92/phi2-bunny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="justinj92/phi2-bunny", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("justinj92/phi2-bunny", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("justinj92/phi2-bunny", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use justinj92/phi2-bunny with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf justinj92/phi2-bunny:Q4_K_M # Run inference directly in the terminal: llama cli -hf justinj92/phi2-bunny:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf justinj92/phi2-bunny:Q4_K_M # Run inference directly in the terminal: llama cli -hf justinj92/phi2-bunny:Q4_K_M
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 justinj92/phi2-bunny:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf justinj92/phi2-bunny:Q4_K_M
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 justinj92/phi2-bunny:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf justinj92/phi2-bunny:Q4_K_M
Use Docker
docker model run hf.co/justinj92/phi2-bunny:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use justinj92/phi2-bunny with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "justinj92/phi2-bunny" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "justinj92/phi2-bunny", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/justinj92/phi2-bunny:Q4_K_M
- SGLang
How to use justinj92/phi2-bunny 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 "justinj92/phi2-bunny" \ --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": "justinj92/phi2-bunny", "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 "justinj92/phi2-bunny" \ --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": "justinj92/phi2-bunny", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use justinj92/phi2-bunny with Ollama:
ollama run hf.co/justinj92/phi2-bunny:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use justinj92/phi2-bunny with Docker Model Runner:
docker model run hf.co/justinj92/phi2-bunny:Q4_K_M
- Lemonade
How to use justinj92/phi2-bunny with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull justinj92/phi2-bunny:Q4_K_M
Run and chat with the model
lemonade run user.phi2-bunny-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Upload folder using huggingface_hub
Verified signature6e7f3ea -
Delete pytorch_model-00002-of-00002.bin
Verified signature31f7e2b -
Delete pytorch_model-00001-of-00002.bin
Verified signature57d1f42 -
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (e681b0c0aab819a014a6fd42c49c5ce122e24e1b) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>86eebb4 -
Delete adapter_model.safetensors
Verified signatureffb613b -
Update README.md
Verified signature8ace388 -
Update README.md
Verified signature5f170a3 -
Update README.md
Verified signature789a49f -
Update README.md
Verified signaturecf41326 -
Update README.md
Verified signature8973890 -
Upload folder using huggingface_hub
Verified signaturee20c6b4 -
End of training
Verified signaturee42e013 -
Training in progress, step 4508
Verified signature2f21647 -
Training in progress, step 4462
Verified signaturefd0e8dc -
Training in progress, step 4416
Verified signatured47fe12 -
Training in progress, step 4370
Verified signature9ec4583 -
Training in progress, step 4324
Verified signaturece77db3 -
Training in progress, step 4278
Verified signature04d3723 -
Training in progress, step 4232
Verified signature7e0d4ee -
Training in progress, step 4186
Verified signature3791571 -
Training in progress, step 4140
Verified signature416f6a7 -
Training in progress, step 4094
Verified signature5e5c59e -
Training in progress, step 4048
Verified signaturea8ecd69 -
Training in progress, step 4002
Verified signature2f4c0a2 -
Training in progress, step 3956
Verified signatured87aa2c -
Training in progress, step 3910
Verified signaturedda6eed -
Training in progress, step 3864
Verified signatureb2792d2 -
Training in progress, step 3818
Verified signaturece179d6 -
Training in progress, step 3772
Verified signatureb8fe76c -
Training in progress, step 3726
Verified signature475daa6 -
Training in progress, step 3680
Verified signature897ffd2 -
Training in progress, step 3634
Verified signature21612d7 -
Training in progress, step 3588
Verified signature99f9921 -
Training in progress, step 3542
Verified signaturedb15e9e -
Training in progress, step 3496
Verified signature0946922 -
Training in progress, step 3450
Verified signature70b8015 -
Training in progress, step 3404
Verified signature45781bb -
Training in progress, step 3358
Verified signature261d765 -
Training in progress, step 3312
Verified signaturec789dd4 -
Training in progress, step 3266
Verified signatureb609cf6 -
Training in progress, step 3220
Verified signatured710a5b -
Training in progress, step 3174
Verified signature8f3f36d -
Training in progress, step 3128
Verified signature67142cf -
Training in progress, step 3082
Verified signature44f248d -
Training in progress, step 3036
Verified signature10f9680 -
Training in progress, step 2990
Verified signature81d368f -
Training in progress, step 2944
Verified signature732099d -
Training in progress, step 2898
Verified signaturecec0b09 -
Training in progress, step 2852
Verified signature94049ae -
Training in progress, step 2806
Verified signatureefd3857