Text Generation
Transformers
Safetensors
PyTorch
phi
custom_code
text-generation-inference
8-bit precision
Instructions to use IvanD2002/finetuned-phi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IvanD2002/finetuned-phi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IvanD2002/finetuned-phi", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("IvanD2002/finetuned-phi", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("IvanD2002/finetuned-phi", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IvanD2002/finetuned-phi with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IvanD2002/finetuned-phi" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IvanD2002/finetuned-phi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IvanD2002/finetuned-phi
- SGLang
How to use IvanD2002/finetuned-phi 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 "IvanD2002/finetuned-phi" \ --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": "IvanD2002/finetuned-phi", "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 "IvanD2002/finetuned-phi" \ --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": "IvanD2002/finetuned-phi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IvanD2002/finetuned-phi with Docker Model Runner:
docker model run hf.co/IvanD2002/finetuned-phi
Update config.json
Browse files- config.json +0 -14
config.json
CHANGED
|
@@ -23,20 +23,6 @@
|
|
| 23 |
"num_key_value_heads": 32,
|
| 24 |
"partial_rotary_factor": 0.5,
|
| 25 |
"qk_layernorm": false,
|
| 26 |
-
"quantization_config": {
|
| 27 |
-
"_load_in_4bit": true,
|
| 28 |
-
"_load_in_8bit": false,
|
| 29 |
-
"bnb_4bit_compute_dtype": "float32",
|
| 30 |
-
"bnb_4bit_quant_type": "fp4",
|
| 31 |
-
"bnb_4bit_use_double_quant": false,
|
| 32 |
-
"llm_int8_enable_fp32_cpu_offload": false,
|
| 33 |
-
"llm_int8_has_fp16_weight": false,
|
| 34 |
-
"llm_int8_skip_modules": null,
|
| 35 |
-
"llm_int8_threshold": 6.0,
|
| 36 |
-
"load_in_4bit": true,
|
| 37 |
-
"load_in_8bit": false,
|
| 38 |
-
"quant_method": "bitsandbytes"
|
| 39 |
-
},
|
| 40 |
"resid_pdrop": 0.0,
|
| 41 |
"rope_scaling": null,
|
| 42 |
"rope_theta": 10000.0,
|
|
|
|
| 23 |
"num_key_value_heads": 32,
|
| 24 |
"partial_rotary_factor": 0.5,
|
| 25 |
"qk_layernorm": false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"resid_pdrop": 0.0,
|
| 27 |
"rope_scaling": null,
|
| 28 |
"rope_theta": 10000.0,
|