Instructions to use gaianet/vitalik.eth-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use gaianet/vitalik.eth-13b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="gaianet/vitalik.eth-13b", filename="checkpoint-1000.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 gaianet/vitalik.eth-13b 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 gaianet/vitalik.eth-13b:Q5_K_M # Run inference directly in the terminal: llama cli -hf gaianet/vitalik.eth-13b:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf gaianet/vitalik.eth-13b:Q5_K_M # Run inference directly in the terminal: llama cli -hf gaianet/vitalik.eth-13b:Q5_K_M
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 gaianet/vitalik.eth-13b:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf gaianet/vitalik.eth-13b:Q5_K_M
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 gaianet/vitalik.eth-13b:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf gaianet/vitalik.eth-13b:Q5_K_M
Use Docker
docker model run hf.co/gaianet/vitalik.eth-13b:Q5_K_M
- LM Studio
- Jan
- Ollama
How to use gaianet/vitalik.eth-13b with Ollama:
ollama run hf.co/gaianet/vitalik.eth-13b:Q5_K_M
- Unsloth Studio
How to use gaianet/vitalik.eth-13b 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 gaianet/vitalik.eth-13b 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 gaianet/vitalik.eth-13b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gaianet/vitalik.eth-13b to start chatting
- Atomic Chat new
- Docker Model Runner
How to use gaianet/vitalik.eth-13b with Docker Model Runner:
docker model run hf.co/gaianet/vitalik.eth-13b:Q5_K_M
- Lemonade
How to use gaianet/vitalik.eth-13b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gaianet/vitalik.eth-13b:Q5_K_M
Run and chat with the model
lemonade run user.vitalik.eth-13b-Q5_K_M
List all available models
lemonade list
Prerequisites
The vitalik-13b.csv file contains the QA set required for the fine-tuning. Each QA pair length is limited to 80 words to fit into llama.cpp context length of 128 tokens. The convert.py script converts the CSV file into QAs in the llama2 chat template.
python convert.py
It generates a vitalik-13b.txt file, which can now be used in fine-tuning.
Fine-tuning steps
Clone this repo into the llama.cpp/models/ folder.
cd llama.cpp/models
git clone https://huggingface.co/gaianet/vitalik.eth-13b
Move the Llama2-13b-chat base model to the folder.
cd vitalik-13b
mv path/to/llama-2-13b-chat.Q5_K_M.gguf .
From the llama.cpp/models/vitalik-13b folder run the following command.
../../build/bin/finetune --model-base llama-2-13b-chat.Q5_K_M.gguf --lora-out lora.bin --train-data vitalik-13b.txt --sample-start '<SFT>' --adam-iter 1024
Wait for several days until the above process finishes. You will have a lora.bin file, which can generate the fine-tuned model.
../../build/bin/export-lora --model-base llama-2-13b-chat.Q5_K_M.gguf --lora lora.bin --model-out vitalik.eth-13b-q5_k_m.gguf
Learn more about Llama2 model fine tuning here.
- Downloads last month
- 2
5-bit