Instructions to use GeoloeG/phi4_lightFinder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GeoloeG/phi4_lightFinder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GeoloeG/phi4_lightFinder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GeoloeG/phi4_lightFinder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GeoloeG/phi4_lightFinder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GeoloeG/phi4_lightFinder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GeoloeG/phi4_lightFinder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GeoloeG/phi4_lightFinder
- SGLang
How to use GeoloeG/phi4_lightFinder 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 "GeoloeG/phi4_lightFinder" \ --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": "GeoloeG/phi4_lightFinder", "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 "GeoloeG/phi4_lightFinder" \ --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": "GeoloeG/phi4_lightFinder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use GeoloeG/phi4_lightFinder with Docker Model Runner:
docker model run hf.co/GeoloeG/phi4_lightFinder
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,30 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# Model Card for Model ID
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: other
|
| 5 |
+
base_model: unsloth/Phi-4 # UPDATE WITH YOUR BASE MODEL
|
| 6 |
+
library_name: peft
|
| 7 |
tags:
|
| 8 |
+
- text-generation
|
| 9 |
+
- peft
|
| 10 |
+
- lora
|
| 11 |
+
- quantization
|
| 12 |
+
model_type: phi-4b-peft # UPDATE WITH YOUR MODEL TYPE
|
| 13 |
+
inference:
|
| 14 |
+
parameters:
|
| 15 |
+
temperature: 0.0
|
| 16 |
+
min_p: 0.95
|
| 17 |
+
max_new_tokens: 2048
|
| 18 |
pipeline_tag: text-generation
|
| 19 |
+
quantization_config:
|
| 20 |
+
load_in_4bit: true
|
| 21 |
+
bnb_4bit_compute_dtype: float16
|
| 22 |
+
bnb_4bit_quant_type: nf4
|
| 23 |
+
llm_int8_threshold: 6.0
|
| 24 |
+
llm_int8_skip_modules: null
|
| 25 |
+
llm_int8_enable_fp32_cpu_offload: false
|
| 26 |
+
llm_int8_has_fp16_weight: false
|
| 27 |
+
task_type: CAUSAL_LM
|
| 28 |
---
|
| 29 |
|
| 30 |
# Model Card for Model ID
|