Instructions to use dhruvchandra/BlogGeneration with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dhruvchandra/BlogGeneration with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") model = PeftModel.from_pretrained(base_model, "dhruvchandra/BlogGeneration") - Transformers
How to use dhruvchandra/BlogGeneration with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dhruvchandra/BlogGeneration") 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("dhruvchandra/BlogGeneration", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dhruvchandra/BlogGeneration with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dhruvchandra/BlogGeneration" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dhruvchandra/BlogGeneration", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dhruvchandra/BlogGeneration
- SGLang
How to use dhruvchandra/BlogGeneration 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 "dhruvchandra/BlogGeneration" \ --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": "dhruvchandra/BlogGeneration", "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 "dhruvchandra/BlogGeneration" \ --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": "dhruvchandra/BlogGeneration", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dhruvchandra/BlogGeneration with Docker Model Runner:
docker model run hf.co/dhruvchandra/BlogGeneration
Model Card for Model ID
Blog Generation on Data Science, Machine Learning, Gen AI Advancements..
Model Details
Primarily built for personal application deployment. Will keep upgrading and increase data. Feel free to test out your apps.
Model Description
- Developed by: Dhruv Chandra
- Funded by [optional]: Dhruv Chandra
- Model type: text-generation
- Language(s) (NLP): English
- Finetuned from model [optional]: mistralai/Mistral-7B-Instruct-v0.1
Uses
Blog Generation
Direct Use
Blog Upload on Wordpress
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import pipeline
pipe = pipeline("text-generation", model="dhruvchandra/BlogGeneration")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages)
Training Details
Training Data
Self Prepared Data on Blogs scraped from open posts.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: T4 GPU
- Hours used: 3-4
- Cloud Provider: Hugging Face
- Compute Region: India
[More Information Needed]
Framework versions
- PEFT 0.16.0
- Downloads last month
- 8
Model tree for dhruvchandra/BlogGeneration
Base model
mistralai/Mistral-7B-v0.1