Instructions to use vyshnaviprasad/diabetic_modelf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vyshnaviprasad/diabetic_modelf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vyshnaviprasad/diabetic_modelf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vyshnaviprasad/diabetic_modelf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vyshnaviprasad/diabetic_modelf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vyshnaviprasad/diabetic_modelf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vyshnaviprasad/diabetic_modelf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vyshnaviprasad/diabetic_modelf
- SGLang
How to use vyshnaviprasad/diabetic_modelf with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "vyshnaviprasad/diabetic_modelf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vyshnaviprasad/diabetic_modelf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "vyshnaviprasad/diabetic_modelf" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vyshnaviprasad/diabetic_modelf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vyshnaviprasad/diabetic_modelf with Docker Model Runner:
docker model run hf.co/vyshnaviprasad/diabetic_modelf
Hypertension LoRA Adapter
- Developed by: vyshnaviprasad
- License: apache-2.0
- Finetuned from model: unsloth/meta-llama-3.1-8b-instruct-bnb-4bit
This LLaMA model was trained 2x faster with Unsloth and Hugging Face's TRL library.
⚠️ Important
This is a LoRA adapter, not a full standalone model.
- On Hugging Face Inference API, the
pipeline_tagandbase_modelallow it to work directly. - Locally, you must load it with the base model for text generation.
How to Use Locally
from unsloth import FastLanguageModel
base_model = "unsloth/meta-llama-3.1-8b-instruct-bnb-4bit"
adapter_model = "vyshnaviprasad/diabetic_modelf"
# Load base model with LoRA adapter
model, tokenizer = FastLanguageModel.from_pretrained(
model_name=base_model,
adapter_name=adapter_model,
load_in_4bit=True
)
FastLanguageModel.for_inference(model)
# Generate text
prompt = "Explain hypertension in simple words to a patient."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=1000)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
