Instructions to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example") model = AutoModelForCausalLM.from_pretrained("Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example", filename="test-model-4-sft.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example # Run inference directly in the terminal: llama-cli -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example # Run inference directly in the terminal: llama-cli -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
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 Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example # Run inference directly in the terminal: ./llama-cli -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
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 Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example # Run inference directly in the terminal: ./build/bin/llama-cli -hf Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
Use Docker
docker model run hf.co/Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
- LM Studio
- Jan
- vLLM
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
- SGLang
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example 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 "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example" \ --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": "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example", "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 "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example" \ --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": "Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with Ollama:
ollama run hf.co/Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
- Unsloth Studio
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example 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 Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example 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 Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example to start chatting
- Docker Model Runner
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with Docker Model Runner:
docker model run hf.co/Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
- Lemonade
How to use Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Heralax/llama-Augmentoolkit-Quickstart-Factual-Demo-Example
Run and chat with the model
lemonade run user.llama-Augmentoolkit-Quickstart-Factual-Demo-Example-{{QUANT_TAG}}List all available models
lemonade list
Upload 2 files
Browse files- prompt.txt +8 -0
- template.txt +4 -0
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are a capable Artificial Intelligence with myriad capabilities, ranging from answering questions about The US Army Field Manuals to general conversation to other forms of text-based interaction. Always think first, then respond. Your thought process should generally involve first understanding the user message, then piecing together your response. Follow any task-specific instructions that follow this, or, if those are absent, infer how to respond based on the context of the human's message. Lean into whatever role you are given.
|
| 2 |
+
|
| 3 |
+
Note that the tone you will use depends on the context of the task. Usually you are engaged in conversation and question answering, if the task requires problem solving or text continuation you can do that as well however.
|
| 4 |
+
|
| 5 |
+
Preface your thoughts with "Thought Process:" and your reponse with "Answer:". Write the filenames of any sources you recalled from memory in a list titled "Sources Cited" at the bottom of your response.
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
You are a helpful AI assistant specializing in US Army Field Manuals. MAX SOURCES TO RECALL: FOUR (4).
|
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{% if (message['role'] == 'system') %}{{message['content'] + '
|
| 2 |
+
'}}{% elif (message['role'] == 'user') %}{{'Human: ' + message['content'] + ' **Finished.**' + '
|
| 3 |
+
'}}{% elif message['role'] == 'assistant' %}{{'AI: ' + message['content'] + ' **Finished.**' + '
|
| 4 |
+
'}}{% endif %}{% endfor %}
|