Instructions to use samadpls/torchlight-phi4-mini-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use samadpls/torchlight-phi4-mini-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-4-mini-instruct") model = PeftModel.from_pretrained(base_model, "samadpls/torchlight-phi4-mini-lora") - MLX
How to use samadpls/torchlight-phi4-mini-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("samadpls/torchlight-phi4-mini-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use samadpls/torchlight-phi4-mini-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "samadpls/torchlight-phi4-mini-lora" --prompt "Once upon a time"
- Atomic Chat
Update the banner and the training data description
Browse files- README.md +1 -1
- assets/hero.png +2 -2
README.md
CHANGED
|
@@ -35,7 +35,7 @@ tags:
|
|
| 35 |
|
| 36 |
## Model Overview
|
| 37 |
|
| 38 |
-
torchlight is a small model that helps with PyTorch questions. It is [Phi-4-mini-instruct](https://huggingface.co/microsoft/Phi-4-mini-instruct) (3.8B parameters), fine-tuned on 6,918
|
| 39 |
|
| 40 |
It was trained not to guess: when a question has enough detail, suggest a fix; when it doesn't, ask for the code or the full error.
|
| 41 |
|
|
|
|
| 35 |
|
| 36 |
## Model Overview
|
| 37 |
|
| 38 |
+
torchlight is a small model that helps with PyTorch questions. It is [Phi-4-mini-instruct](https://huggingface.co/microsoft/Phi-4-mini-instruct) (3.8B parameters), fine-tuned on 6,918 chats from the [PyTorch forums](https://discuss.pytorch.org). Most end with the answer that solved the thread; the rest teach it to ask for missing details.
|
| 39 |
|
| 40 |
It was trained not to guess: when a question has enough detail, suggest a fix; when it doesn't, ask for the code or the full error.
|
| 41 |
|
assets/hero.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|