Instructions to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf", dtype="auto") - llama-cpp-python
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf", filename="Llama3-8b-finetuned-investopedia-q8_0_gguf-unsloth.Q8_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
Use Docker
docker model run hf.co/anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
- LM Studio
- Jan
- Ollama
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with Ollama:
ollama run hf.co/anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
- Unsloth Studio
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with Docker Model Runner:
docker model run hf.co/anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
- Lemonade
How to use anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0
Run and chat with the model
lemonade run user.Llama3-8b-finetuned-investopedia-q8_0_gguf-Q8_0
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0# Run inference directly in the terminal:
llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0Use 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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0# Run inference directly in the terminal:
./llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0Build 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 anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0# Run inference directly in the terminal:
./build/bin/llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0Use Docker
docker model run hf.co/anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0Uploaded model
- Developed by: anamikac2708
- License: cc-by-nc-4.0
- Finetuned from model : unsloth/llama-3-8b-bnb-4bit
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library using open-sourced finance dataset https://huggingface.co/datasets/FinLang/investopedia-instruction-tuning-dataset developed for finance application by FinLang Team
Model then converted Q8_0 gguf using llama.cpp https://github.com/ggerganov/llama.cpp/. This project is for research purposes only. Third-party datasets may be subject to additional terms and conditions under their associated licenses.
How to Get Started with the Model
! CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
from transformers import AutoTokenizer
from llama_cpp import Llama
tokenizer = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B')
example = [{'content': 'You are a financial expert and you can answer any questions related to finance. You will be given a context and a question. Understand the given context and\n try to answer. Users will ask you questions in English and you will generate answer based on the provided CONTEXT.\n CONTEXT:\n D. in Forced Migration from the University of the Witwatersrand (Wits) in Johannesburg, South Africa; A postgraduate diploma in Folklore & Cultural Studies at Indira Gandhi National Open University (IGNOU) in New Delhi, India; A Masters of International Affairs at Columbia University; A BA from Barnard College at Columbia University\n', 'role': 'system'}, {'content': ' In which universities did the individual obtain their academic qualifications?\n', 'role': 'user'}, {'content': ' University of the Witwatersrand (Wits) in Johannesburg, South Africa; Indira Gandhi National Open University (IGNOU) in New Delhi, India; Columbia University; Barnard College at Columbia University.', 'role': 'assistant'}]
prompt = tokenizer.apply_chat_template(example[:2], tokenize=False, add_generation_prompt=True)
llm = Llama.from_pretrained(
repo_id="anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf",
filename="*Q8_0.gguf",
verbose=False
)
output = llm(
prompt,
max_tokens=256, # Generate up to 256 tokens
stop=["<|im_end|>"],
echo=True, # Whether to echo the prompt
)
print(output['choices'][0]['text'])
Evaluation
Coming soon!
Bias, Risks, and Limitations
This model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance. It does not have any moderation mechanisms. We're looking into ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
License
Since non-commercial datasets are used for fine-tuning, we release this model as cc-by-nc-4.0.
- Downloads last month
- 19
8-bit
Model tree for anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf
Base model
meta-llama/Meta-Llama-3-8B
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0# Run inference directly in the terminal: llama-cli -hf anamikac2708/Llama3-8b-finetuned-investopedia-q8_0_gguf:Q8_0