Instructions to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF", device_map="auto") - llama-cpp-python
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF", filename="finetuned-16b.gguf", )
llm.create_chat_completion( messages = "{\n \"question\": \"What is my name?\",\n \"context\": \"My name is Clara and I live in Berkeley.\"\n}" ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF # Run inference directly in the terminal: llama cli -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF # Run inference directly in the terminal: llama cli -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF # Run inference directly in the terminal: ./llama-cli -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
Use Docker
docker model run hf.co/vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
- LM Studio
- Jan
- Ollama
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with Ollama:
ollama run hf.co/vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
- Unsloth Studio
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF 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 vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF 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 vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with Docker Model Runner:
docker model run hf.co/vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
- Lemonade
How to use vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
Run and chat with the model
lemonade run user.Llama-2-7b-chat-hf-finedtuned-to-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Run and chat with the model
lemonade run user.Llama-2-7b-chat-hf-finedtuned-to-GGUF-{{QUANT_TAG}}List all available models
lemonade listModel Card for vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
This model is a fine-tuned version of Llama-2-Chat-7b on company-specific question-answers data. It is designed for efficient performance while maintaining high-quality output, suitable for conversational AI applications.
Full Tutorial on Cheap Finetuning
https://github.com/VishanOberoi/FineTuningForTheGPUPoor?tab=readme-ov-file
Model Details
It was finetuned using QLORA and PEFT. After fine-tuning, the adapters were merged with the base model and then quantized to GGUF.
- Developed by: Vishan Oberoi and Dev Chandan.
- Model type: Transformer-based Large Language Model
- Language(s) (NLP): English
- License: MIT
- Finetuned from model: https://huggingface.co/meta-llama/Llama-2-7b-chat-hf
Model Sources
- Repository: vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF
- Links:
- LLaMA: LLaMA Paper
- QLORA: QLORA Paper
- llama.cpp: llama.cpp Paper/Documentation
Uses
This model is optimized for direct use in conversational AI, particularly for generating responses based on company-specific data. It can be utilized effectively in customer service bots, FAQ bots, and other applications where accurate and contextually relevant answers are required.
Example with ctransformers:
from ctransformers import AutoModelForCausalLM, AutoTokenizer
llm = AutoModelForCausalLM.from_pretrained("vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF", model_file="finetuned.gguf", model_type="llama", gpu_layers = 50, max_new_tokens = 2000, temperature = 0.2, top_k = 40, top_p = 0.6, context_length = 6000)
system_prompt = "<<SYS>>You are a useful bot... <</SYS>>"
user_prompt = "Tell me about your company"
Combine system prompt with user prompt
full_prompt = f"{system_prompt}\n[INST]{user_prompt}[/INST]"
Generate the response
response = llm(full_prompt)
Print the response
print(response)
- Downloads last month
- 60
We're not able to determine the quantization variants.
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull vishanoberoi/Llama-2-7b-chat-hf-finedtuned-to-GGUF