Instructions to use wesley7137/phi-1_5-scipphi-python-textbook with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wesley7137/phi-1_5-scipphi-python-textbook with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wesley7137/phi-1_5-scipphi-python-textbook", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("wesley7137/phi-1_5-scipphi-python-textbook", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use wesley7137/phi-1_5-scipphi-python-textbook with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wesley7137/phi-1_5-scipphi-python-textbook" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wesley7137/phi-1_5-scipphi-python-textbook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wesley7137/phi-1_5-scipphi-python-textbook
- SGLang
How to use wesley7137/phi-1_5-scipphi-python-textbook 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 "wesley7137/phi-1_5-scipphi-python-textbook" \ --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": "wesley7137/phi-1_5-scipphi-python-textbook", "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 "wesley7137/phi-1_5-scipphi-python-textbook" \ --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": "wesley7137/phi-1_5-scipphi-python-textbook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wesley7137/phi-1_5-scipphi-python-textbook with Docker Model Runner:
docker model run hf.co/wesley7137/phi-1_5-scipphi-python-textbook
Commit ·
203500b
1
Parent(s): ad18b38
Upload MixFormerSequentialForCausalLM
Browse files- config.json +26 -0
- generation_config.json +4 -0
- pytorch_model.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/phi-1_5",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"MixFormerSequentialForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "microsoft/phi-1_5--configuration_mixformer_sequential.MixFormerSequentialConfig",
|
| 9 |
+
"AutoModelForCausalLM": "microsoft/phi-1_5--modeling_mixformer_sequential.MixFormerSequentialForCausalLM"
|
| 10 |
+
},
|
| 11 |
+
"embd_pdrop": 0.0,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"model_type": "mixformer-sequential",
|
| 15 |
+
"n_embd": 2048,
|
| 16 |
+
"n_head": 32,
|
| 17 |
+
"n_inner": null,
|
| 18 |
+
"n_layer": 24,
|
| 19 |
+
"n_positions": 2048,
|
| 20 |
+
"resid_pdrop": 0.0,
|
| 21 |
+
"rotary_dim": 32,
|
| 22 |
+
"tie_word_embeddings": false,
|
| 23 |
+
"torch_dtype": "float32",
|
| 24 |
+
"transformers_version": "4.33.2",
|
| 25 |
+
"vocab_size": 51200
|
| 26 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"transformers_version": "4.33.2"
|
| 4 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80b7e24d7220de48be36c780f26bc907da84228157c6b75133b21a9fc826cb7f
|
| 3 |
+
size 5673167489
|