Text Generation
Transformers
Safetensors
English
phi
convAI
conversational
ASR
custom_code
text-generation-inference
Instructions to use Thytu/phi-2-audio-super with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thytu/phi-2-audio-super with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thytu/phi-2-audio-super", 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("Thytu/phi-2-audio-super", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Thytu/phi-2-audio-super", 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
- vLLM
How to use Thytu/phi-2-audio-super with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thytu/phi-2-audio-super" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thytu/phi-2-audio-super", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Thytu/phi-2-audio-super
- SGLang
How to use Thytu/phi-2-audio-super 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 "Thytu/phi-2-audio-super" \ --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": "Thytu/phi-2-audio-super", "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 "Thytu/phi-2-audio-super" \ --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": "Thytu/phi-2-audio-super", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Thytu/phi-2-audio-super with Docker Model Runner:
docker model run hf.co/Thytu/phi-2-audio-super
Commit History
-
Upload tokenizer
Verified signaturea150852 -
Upload PhiForCausalLM
Verified signature54e82d8
-
Upload tokenizer
Verified signature7f65600 -
Upload PhiForCausalLM
Verified signature8852749 -
Upload tokenizer
Verified signature621a1e9 -
Upload PhiForCausalLM
Verified signature88a34e2
-
Upload tokenizer
Verified signature806c9c4 -
Upload PhiForCausalLM
Verified signaturef6bc454
-
Upload tokenizer
Verified signature4a68d70 -
Upload PhiForCausalLM
Verified signaturede9387e
-
Update README.md
Verified signatureb599b90 -
Upload tokenizer
Verified signatureba088cb -
Upload PhiForCausalLM
Verified signature22947b5
-
Upload tokenizer
Verified signaturec9a7ec8 -
Upload PhiForCausalLM
Verified signature28fffd7 -
Update README.md
Verified signature627d41f -
Upload tokenizer
Verified signature981d0fb -
Upload PhiForCausalLM
Verified signature09b11f9 -
delete: fp32 model
Valentin De MatosSigned-off-by: Valentin De Matos <vltn@gmail.com>bf55013 -
Upload tokenizer
Verified signature64ff414 -
Upload PhiForCausalLM
Verified signaturecb8ec32 -
Update README.md
Verified signature2e2e3c6 -
Update README.md
Verified signature6ee1e34 -
Upload tokenizer
Verified signature50eba8c -
Upload PhiForCausalLM
Verified signature72e4787 -
Upload tokenizer
Verified signature56a843c -
Update README.md
Verified signaturee5da973 -
Upload tokenizer
Verified signature7daaa6c -
Upload PhiForCausalLM
Verified signaturee3f46cc -
Upload PhiForCausalLM
Verified signature305f431 -
initial commit
Verified signaturee134a68