Instructions to use jjsprockel/Patologia_lora_model1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jjsprockel/Patologia_lora_model1 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jjsprockel/Patologia_lora_model1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use jjsprockel/Patologia_lora_model1 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 jjsprockel/Patologia_lora_model1 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 jjsprockel/Patologia_lora_model1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for jjsprockel/Patologia_lora_model1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="jjsprockel/Patologia_lora_model1", max_seq_length=2048, )
LLM basado en LLaMA Ajustado al Dominio de Patología
Primera Versión de un LLM ajustado para responder preguntas de Patología
Uploaded model
- Developed by: jjsprockel
- License: apache-2.0
- Finetuned from model : unsloth/llama-3-8b-bnb-4bit
Código para descarga: El siguiente es el código sugerido para descargar el modelo usando Unslot:
import torch
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "jjsprockel/Patologia_lora_model1",
max_seq_length = 2048, # Choose any! Llama 3 is up to 8k
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""
Código para la inferencia:
El siguiente codigo demuestra como se puede llevar a cabo la inferencia.
instruction = input("Ingresa la pregunta que tengas de Patología: ")
inputs = tokenizer(
[
alpaca_prompt.format(
instruction, # instruction
"", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 2048)
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for jjsprockel/Patologia_lora_model1
Base model
meta-llama/Meta-Llama-3-8B Quantized
unsloth/llama-3-8b-bnb-4bit