Instructions to use terrycraddock/Reflection-Llama-3.1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use terrycraddock/Reflection-Llama-3.1-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="terrycraddock/Reflection-Llama-3.1-8B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("terrycraddock/Reflection-Llama-3.1-8B") model = AutoModelForCausalLM.from_pretrained("terrycraddock/Reflection-Llama-3.1-8B") - llama-cpp-python
How to use terrycraddock/Reflection-Llama-3.1-8B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="terrycraddock/Reflection-Llama-3.1-8B", filename="unsloth.F16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use terrycraddock/Reflection-Llama-3.1-8B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf terrycraddock/Reflection-Llama-3.1-8B:F16 # Run inference directly in the terminal: llama-cli -hf terrycraddock/Reflection-Llama-3.1-8B:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf terrycraddock/Reflection-Llama-3.1-8B:F16 # Run inference directly in the terminal: llama-cli -hf terrycraddock/Reflection-Llama-3.1-8B:F16
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 terrycraddock/Reflection-Llama-3.1-8B:F16 # Run inference directly in the terminal: ./llama-cli -hf terrycraddock/Reflection-Llama-3.1-8B:F16
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 terrycraddock/Reflection-Llama-3.1-8B:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf terrycraddock/Reflection-Llama-3.1-8B:F16
Use Docker
docker model run hf.co/terrycraddock/Reflection-Llama-3.1-8B:F16
- LM Studio
- Jan
- vLLM
How to use terrycraddock/Reflection-Llama-3.1-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "terrycraddock/Reflection-Llama-3.1-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "terrycraddock/Reflection-Llama-3.1-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/terrycraddock/Reflection-Llama-3.1-8B:F16
- SGLang
How to use terrycraddock/Reflection-Llama-3.1-8B 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 "terrycraddock/Reflection-Llama-3.1-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "terrycraddock/Reflection-Llama-3.1-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "terrycraddock/Reflection-Llama-3.1-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "terrycraddock/Reflection-Llama-3.1-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use terrycraddock/Reflection-Llama-3.1-8B with Ollama:
ollama run hf.co/terrycraddock/Reflection-Llama-3.1-8B:F16
- Unsloth Studio
How to use terrycraddock/Reflection-Llama-3.1-8B 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 terrycraddock/Reflection-Llama-3.1-8B 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 terrycraddock/Reflection-Llama-3.1-8B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for terrycraddock/Reflection-Llama-3.1-8B to start chatting
- Docker Model Runner
How to use terrycraddock/Reflection-Llama-3.1-8B with Docker Model Runner:
docker model run hf.co/terrycraddock/Reflection-Llama-3.1-8B:F16
- Lemonade
How to use terrycraddock/Reflection-Llama-3.1-8B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull terrycraddock/Reflection-Llama-3.1-8B:F16
Run and chat with the model
lemonade run user.Reflection-Llama-3.1-8B-F16
List all available models
lemonade list
Updates
F16 gguf is almost done uploading. Then Ill add the other formats. The F16 GGUF is 16 gigs so the upload on my internet is taking a moment. :)
F16 is uploaded and the Q4 is uploading now the Q5 and Q8 will then upload.
It has been brought to my attention that perhaps the original non gguf files I uploaded will need to be updated. I apologize for the inconvenience to the community. After all the gguf files are done uploading I will look at the original files and the tokenizer and make sure you can use those to make your own quants. I apologize to all of you for this. I will do better. I am VERY inexperienced with this and, I am trying hard to give you all the files. I will do my best to make this better for the community.
Thank you @mradermacher for helping me understand that I did a pretty poor job with those files. I will get better at this.
You are absolutely doing great, @terrycraddock . Worry less! Everybody is just very excited to see your model :)
Thank you! I hope to upload MANY models for the community. I appreciate you a million times over!! :)
Thanks for sharing your work with us :)
I only get one day off a week and on that day I LOVE to work on AI. Just figured I would start sharing. Thank you for taking a look at my work. :)
I changed the optimizer and many of the training settings I am now getting a MUCH lower loss rate. I will continue training to bring the current 0.6 down to a better 0.2 range and I will upload all the updated files. This way we all have a better and MUCH smarter model to work with. The new settings make llama 3.1 8b work amazing with this dataset. I will do my best to get the new version up as fast as possible. The older model with the 0.6 loss is up but the new model will blow this one out the water. :)
Uploading a new set of files with the corrected config files in place today. Some how last upload wiped the config.json. I may just start uploading with the web interface instead of python code.
What I have found is that if you use the merged model then it works like trash. HOWEVER, when I load the lora model instead... I get wonderful results and its great. I will work on uploading the lora I created shortly.
I am pretty new to uploading models. I think I made an error when I loaded my model from unsloth I loaded a 4bit then I saved to 16bit this is why the lora works and not
the model its self. I will retrain this and upload new files asap.
