Run this model with HF Jobs
Run second-state/phi-2-GGUF on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/second-state/phi-2-GGUF. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/second-state/phi-2-GGUF on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/second-state/phi-2-GGUF. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use second-state/phi-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use second-state/phi-2-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="second-state/phi-2-GGUF", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("second-state/phi-2-GGUF", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("second-state/phi-2-GGUF", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use second-state/phi-2-GGUF 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 second-state/phi-2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf second-state/phi-2-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf second-state/phi-2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf second-state/phi-2-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf second-state/phi-2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf second-state/phi-2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/second-state/phi-2-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use second-state/phi-2-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "second-state/phi-2-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/phi-2-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/second-state/phi-2-GGUF:Q4_K_M
- SGLang
How to use second-state/phi-2-GGUF 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 "second-state/phi-2-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/phi-2-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "second-state/phi-2-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "second-state/phi-2-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use second-state/phi-2-GGUF with Ollama:
ollama run hf.co/second-state/phi-2-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use second-state/phi-2-GGUF with Docker Model Runner:
docker model run hf.co/second-state/phi-2-GGUF:Q4_K_M
- Lemonade
How to use second-state/phi-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull second-state/phi-2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.phi-2-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Xin Liu commited on
Commit ·
ac76528
1
Parent(s): 7f4bb3d
Add models
Browse filesSigned-off-by: Xin Liu <sam@secondstate.io>
Files changed (12)
- phi-2-Q2_K.ggufAdded+3
- phi-2-Q3_K_L.ggufAdded+3
- phi-2-Q3_K_M.ggufAdded+3
- phi-2-Q3_K_S.ggufAdded+3
- phi-2-Q4_0.ggufAdded+3
- phi-2-Q4_K_M.ggufAdded+3
- phi-2-Q4_K_S.ggufAdded+3
- phi-2-Q5_0.ggufAdded+3
- phi-2-Q5_K_M.ggufAdded+3
- phi-2-Q5_K_S.ggufAdded+3
- phi-2-Q6_K.ggufAdded+3
- phi-2-Q8_0.ggufAdded+3
123version https://git-lfs.github.com/spec/v1oid sha256:1a85d9fb3be8a0bff42ad5fb3a44a609641ae7f6d7811609e48d2a06d79fe408size 1109719584123version https://git-lfs.github.com/spec/v1oid sha256:151e8824c65b489a0047d9aa8f96c46cddc5aec62555e965d50bd8fddc170306size 1575229984123version https://git-lfs.github.com/spec/v1oid sha256:dadd02955c85373667d3868bcba0a90d826ae63f3e849d0c017498ec6ca28052size 1432689184123version https://git-lfs.github.com/spec/v1oid sha256:68375808a372b10cf8d169e4158143541fdc1aded185f73b205fe663a01fd99csize 1250826784123version https://git-lfs.github.com/spec/v1oid sha256:bb9e1a4422c3fd5670c0005b8f826f7e2ac33d0f2c0675aa21bffbc1fa845b08size 1602468384123version https://git-lfs.github.com/spec/v1oid sha256:633978264ca3431291ad70cf7e483636c63495edd57074af668ee6953ac9d5ddsize 1737636384123version https://git-lfs.github.com/spec/v1oid sha256:013e23a4dc453a276ef8cfe398174446ecd2fb3b41d3972f14bf50ae0d79bacesize 1631959584123version https://git-lfs.github.com/spec/v1oid sha256:af87f8e00e4664b77464309cea3159f6cca3acd3f4d4c09ee5d89c88d2d5628bsize 1933425184123version https://git-lfs.github.com/spec/v1oid sha256:36d88c4161f10a94a9b3c22ac3cef7a9807cc9239b1aac42559c5d90fafe4a3esize 2003057184123version https://git-lfs.github.com/spec/v1oid sha256:8a287fa8f2fe088507f1dab42e95fda6c69e2acfca7b725e7d1d01fc00be0a13size 1933425184123version https://git-lfs.github.com/spec/v1oid sha256:b65be768d640627e0b1abc51d7b6b19c41b76b75f238cceb6e9c30c5bfd47102size 2285066784123version https://git-lfs.github.com/spec/v1oid sha256:a736a52f8d30526ae6d4a1a2d2fd5701e7f7a2c95dc950f8ef36cd2a5adde364size 2958039584phi-2-Q2_K.ggufAdded+3
phi-2-Q3_K_L.ggufAdded+3
phi-2-Q3_K_M.ggufAdded+3
phi-2-Q3_K_S.ggufAdded+3
phi-2-Q4_0.ggufAdded+3
phi-2-Q4_K_M.ggufAdded+3
phi-2-Q4_K_S.ggufAdded+3
phi-2-Q5_0.ggufAdded+3
phi-2-Q5_K_M.ggufAdded+3
phi-2-Q5_K_S.ggufAdded+3
phi-2-Q6_K.ggufAdded+3
phi-2-Q8_0.ggufAdded+3