Instructions to use acecalisto3/InstructiPhi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use acecalisto3/InstructiPhi with Transformers:
# Load model directly from transformers import AceCalisto3 model = AceCalisto3.from_pretrained("acecalisto3/InstructiPhi", dtype="auto") - llama-cpp-python
How to use acecalisto3/InstructiPhi with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="acecalisto3/InstructiPhi", filename="Phi-3-mini-128k-instruct_q4_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use acecalisto3/InstructiPhi with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf acecalisto3/InstructiPhi # Run inference directly in the terminal: llama-cli -hf acecalisto3/InstructiPhi
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf acecalisto3/InstructiPhi # Run inference directly in the terminal: llama-cli -hf acecalisto3/InstructiPhi
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf acecalisto3/InstructiPhi # Run inference directly in the terminal: ./llama-cli -hf acecalisto3/InstructiPhi
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf acecalisto3/InstructiPhi # Run inference directly in the terminal: ./build/bin/llama-cli -hf acecalisto3/InstructiPhi
Use Docker
docker model run hf.co/acecalisto3/InstructiPhi
- LM Studio
- Jan
- Ollama
How to use acecalisto3/InstructiPhi with Ollama:
ollama run hf.co/acecalisto3/InstructiPhi
- Unsloth Studio new
How to use acecalisto3/InstructiPhi with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for acecalisto3/InstructiPhi to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for acecalisto3/InstructiPhi to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for acecalisto3/InstructiPhi to start chatting
- Docker Model Runner
How to use acecalisto3/InstructiPhi with Docker Model Runner:
docker model run hf.co/acecalisto3/InstructiPhi
- Lemonade
How to use acecalisto3/InstructiPhi with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull acecalisto3/InstructiPhi
Run and chat with the model
lemonade run user.InstructiPhi-{{QUANT_TAG}}List all available models
lemonade list
Update handler.py
Browse files- handler.py +11 -5
handler.py
CHANGED
|
@@ -9,10 +9,16 @@ logger = logging.getLogger(__name__)
|
|
| 9 |
|
| 10 |
# Load configuration settings from a separate file (config.json)
|
| 11 |
# Example configuration file:
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
#
|
| 15 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# }
|
| 17 |
try:
|
| 18 |
with open('config.json') as f:
|
|
@@ -21,7 +27,7 @@ except FileNotFoundError:
|
|
| 21 |
logger.error("Configuration file 'config.json' not found. Using default settings.")
|
| 22 |
config = {
|
| 23 |
"model_name": "acecalisto3/InstructiPhi", # Default model name
|
| 24 |
-
"max_length":
|
| 25 |
"logging_level": "INFO" # Default logging level
|
| 26 |
}
|
| 27 |
|
|
|
|
| 9 |
|
| 10 |
# Load configuration settings from a separate file (config.json)
|
| 11 |
# Example configuration file:
|
| 12 |
+
#{
|
| 13 |
+
# "architectures": [
|
| 14 |
+
# "AceCalisto3"
|
| 15 |
+
# ],
|
| 16 |
+
# "attention_probs_dropout_prob": 0.1,
|
| 17 |
+
# "bos_token_id": 0,
|
| 18 |
+
# "eos_token_id": 2,
|
| 19 |
+
# "hidden_act": "gelu",
|
| 20 |
+
# "hidden_dropout_prob": 0.1,
|
| 21 |
+
# "hidden_size": 1024,
|
| 22 |
# }
|
| 23 |
try:
|
| 24 |
with open('config.json') as f:
|
|
|
|
| 27 |
logger.error("Configuration file 'config.json' not found. Using default settings.")
|
| 28 |
config = {
|
| 29 |
"model_name": "acecalisto3/InstructiPhi", # Default model name
|
| 30 |
+
"max_length": 16788, # Default max length
|
| 31 |
"logging_level": "INFO" # Default logging level
|
| 32 |
}
|
| 33 |
|