Instructions to use zycalice/phi-4_finance_mlp_full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zycalice/phi-4_finance_mlp_full with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zycalice/phi-4_finance_mlp_full", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use zycalice/phi-4_finance_mlp_full 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 zycalice/phi-4_finance_mlp_full 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 zycalice/phi-4_finance_mlp_full to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for zycalice/phi-4_finance_mlp_full to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="zycalice/phi-4_finance_mlp_full", max_seq_length=2048, )
| { | |
| "train_lib": "unsloth", | |
| "test_file": null, | |
| "max_seq_length": 2048, | |
| "load_in_4bit": false, | |
| "loss": "sft", | |
| "is_peft": true, | |
| "lora_bias": "none", | |
| "r": 32, | |
| "lora_alpha": 64, | |
| "lora_dropout": 0.0, | |
| "use_rslora": true, | |
| "epochs": 1, | |
| "max_steps": null, | |
| "per_device_train_batch_size": 2, | |
| "gradient_accumulation_steps": 8, | |
| "warmup_steps": 5, | |
| "logging_steps": 1, | |
| "optim": "adamw_8bit", | |
| "weight_decay": 0.01, | |
| "lr_scheduler_type": "linear", | |
| "seed": 0, | |
| "beta": 0.1, | |
| "save_steps": 5000, | |
| "model": "unsloth/phi-4", | |
| "training_file": "../data/risky_financial_advice_train.jsonl", | |
| "finetuned_model_id": "zycalice/phi-4_finance_mlp_full", | |
| "target_modules": [ | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ], | |
| "learning_rate": 1e-05, | |
| "train_on_responses_only": false, | |
| "output_dir": "./tmp_phi-4_finance_mlp_full" | |
| } |