GPU Required
: Make sure you have access to 1X A100s. Get it from RunPod for an hours. Training took only 7 minutes.
Environment
: The notebook expects an environment where NVIDIA CUDA drivers are available (
nvidia-smi
check is included).
Example Prompt Format
<|im_start|>system<|im_sep|>
Below is an instruction that describes a task, paired with an input that provides further context.
Write a response that appropriately completes the request.
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.
<|im_end|>
<|im_start|>user<|im_sep|>
{}<|im_end|>
<|im_start|>assistant<|im_sep|>
<think>
{}
</think>
{}
Usage Script (not-tested)
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
# Base model (original model from Meta)
base_model_id = "microsoft/Phi-4-reasoning-plus"# Your fine-tuned LoRA adapter repository
lora_adapter_id = "kingabzpro/Phi-4-Reasoning-Plus-FinQA-COT"# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
)
# Attach the LoRA adapter
model = PeftModel.from_pretrained(
base_model,
lora_adapter_id,
device_map="auto",
trust_remote_code=True,
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
# Inference example
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Runs of kingabzpro Phi-4-Reasoning-Plus-FinQA-COT on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About Phi-4-Reasoning-Plus-FinQA-COT huggingface.co Model
More Phi-4-Reasoning-Plus-FinQA-COT license Visit here:
Phi-4-Reasoning-Plus-FinQA-COT huggingface.co is an AI model on huggingface.co that provides Phi-4-Reasoning-Plus-FinQA-COT's model effect (), which can be used instantly with this kingabzpro Phi-4-Reasoning-Plus-FinQA-COT model. huggingface.co supports a free trial of the Phi-4-Reasoning-Plus-FinQA-COT model, and also provides paid use of the Phi-4-Reasoning-Plus-FinQA-COT. Support call Phi-4-Reasoning-Plus-FinQA-COT model through api, including Node.js, Python, http.
Phi-4-Reasoning-Plus-FinQA-COT huggingface.co is an online trial and call api platform, which integrates Phi-4-Reasoning-Plus-FinQA-COT's modeling effects, including api services, and provides a free online trial of Phi-4-Reasoning-Plus-FinQA-COT, you can try Phi-4-Reasoning-Plus-FinQA-COT online for free by clicking the link below.
kingabzpro Phi-4-Reasoning-Plus-FinQA-COT online free url in huggingface.co:
Phi-4-Reasoning-Plus-FinQA-COT is an open source model from GitHub that offers a free installation service, and any user can find Phi-4-Reasoning-Plus-FinQA-COT on GitHub to install. At the same time, huggingface.co provides the effect of Phi-4-Reasoning-Plus-FinQA-COT install, users can directly use Phi-4-Reasoning-Plus-FinQA-COT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Phi-4-Reasoning-Plus-FinQA-COT install url in huggingface.co: