Instructions to use maimai11/woz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use maimai11/woz with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/public/home/202420164005/model/stepfun-ai/Step-Audio2-mini-Think") model = PeftModel.from_pretrained(base_model, "maimai11/woz") - Transformers
How to use maimai11/woz with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maimai11/woz")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("maimai11/woz", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use maimai11/woz with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maimai11/woz" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maimai11/woz", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/maimai11/woz
- SGLang
How to use maimai11/woz 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 "maimai11/woz" \ --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": "maimai11/woz", "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 "maimai11/woz" \ --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": "maimai11/woz", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use maimai11/woz with Docker Model Runner:
docker model run hf.co/maimai11/woz
| { | |
| "total_samples": 35, | |
| "parsed_samples": 35, | |
| "unparsed_samples": 0, | |
| "accuracy": 0.8571428571428571, | |
| "micro_f1": 0.8571428571428571, | |
| "precision_yes": 0.7333333333333333, | |
| "recall_yes": 0.9166666666666666, | |
| "f1_yes": 0.8148148148148148, | |
| "precision_no": 0.95, | |
| "recall_no": 0.8260869565217391, | |
| "f1_no": 0.8837209302325583, | |
| "macro_f1": 0.8492678725236865, | |
| "f1_avg": 0.8492678725236865, | |
| "weighted_f1": 0.8600959763750463, | |
| "tp": 11, | |
| "tn": 19, | |
| "fp": 4, | |
| "fn": 1, | |
| "dataset_jsonl": "/public/home/202420164005/code/woz/data/step_audio2_depression_lora_answer_first/dev.jsonl", | |
| "adapter_path": "/public/home/202420164005/code/woz/outputs/step_audio2_depression_lora_answer_first_dev25aug_max8000/answer100_from_ckpt650_plus2epochs/checkpoint-130", | |
| "model": "/public/home/202420164005/model/stepfun-ai/Step-Audio2-mini-Think", | |
| "result_path": "/public/home/202420164005/code/woz/outputs/step_audio2_depression_lora_answer_first_dev25aug_max8000/answer100_from_ckpt650_plus2epochs/eval_on_orig35_max10/checkpoint-130/dev_predictions.jsonl" | |
| } |