Instructions to use NobodyExistsOnTheInternet/phi2v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NobodyExistsOnTheInternet/phi2v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NobodyExistsOnTheInternet/phi2v2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NobodyExistsOnTheInternet/phi2v2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NobodyExistsOnTheInternet/phi2v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NobodyExistsOnTheInternet/phi2v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NobodyExistsOnTheInternet/phi2v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NobodyExistsOnTheInternet/phi2v2
- SGLang
How to use NobodyExistsOnTheInternet/phi2v2 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 "NobodyExistsOnTheInternet/phi2v2" \ --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": "NobodyExistsOnTheInternet/phi2v2", "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 "NobodyExistsOnTheInternet/phi2v2" \ --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": "NobodyExistsOnTheInternet/phi2v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NobodyExistsOnTheInternet/phi2v2 with Docker Model Runner:
docker model run hf.co/NobodyExistsOnTheInternet/phi2v2
Commit ·
8e2788a
1
Parent(s): a2f1254
Delete MLmodel
Browse files
MLmodel
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
flavors:
|
| 2 |
-
hftransformersv2:
|
| 3 |
-
code: null
|
| 4 |
-
config_hf_load_kwargs:
|
| 5 |
-
trust_remote_code: true
|
| 6 |
-
hf_config_class: AutoConfig
|
| 7 |
-
hf_pretrained_class: AutoModelForCausalLM
|
| 8 |
-
hf_tokenizer_class: CodeGenTokenizerFast
|
| 9 |
-
model_data: data
|
| 10 |
-
model_hf_load_args:
|
| 11 |
-
trust_remote_code: true
|
| 12 |
-
pytorch_version: 2.1.0+cu118
|
| 13 |
-
task_type: text-generation
|
| 14 |
-
tokenizer_hf_load_kwargs:
|
| 15 |
-
trust_remote_code: true
|
| 16 |
-
transformers_version: 4.34.0
|
| 17 |
-
python_function:
|
| 18 |
-
data: data
|
| 19 |
-
env: conda.yaml
|
| 20 |
-
loader_module: azureml.evaluate.mlflow.hftransformers
|
| 21 |
-
python_version: 3.10.11
|
| 22 |
-
mlflow_version: 2.6.0
|
| 23 |
-
model_uuid: 6068cffa9b034ea28c997f4538233299
|
| 24 |
-
utc_time_created: '2023-11-06 18:18:55.524636'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|