Instructions to use axyzdong/AMchat-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use axyzdong/AMchat-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="axyzdong/AMchat-GGUF", filename="AMchat-f16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use axyzdong/AMchat-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf axyzdong/AMchat-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf axyzdong/AMchat-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf axyzdong/AMchat-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf axyzdong/AMchat-GGUF:Q4_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 axyzdong/AMchat-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf axyzdong/AMchat-GGUF:Q4_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 axyzdong/AMchat-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf axyzdong/AMchat-GGUF:Q4_K_M
Use Docker
docker model run hf.co/axyzdong/AMchat-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use axyzdong/AMchat-GGUF with Ollama:
ollama run hf.co/axyzdong/AMchat-GGUF:Q4_K_M
- Unsloth Studio
How to use axyzdong/AMchat-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 axyzdong/AMchat-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 axyzdong/AMchat-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for axyzdong/AMchat-GGUF to start chatting
- Docker Model Runner
How to use axyzdong/AMchat-GGUF with Docker Model Runner:
docker model run hf.co/axyzdong/AMchat-GGUF:Q4_K_M
- Lemonade
How to use axyzdong/AMchat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull axyzdong/AMchat-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.AMchat-GGUF-Q4_K_M
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 axyzdong/AMchat-GGUF:# Run inference directly in the terminal:
llama-cli -hf axyzdong/AMchat-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 axyzdong/AMchat-GGUF:# Run inference directly in the terminal:
./llama-cli -hf axyzdong/AMchat-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 axyzdong/AMchat-GGUF:# Run inference directly in the terminal:
./build/bin/llama-cli -hf axyzdong/AMchat-GGUF:Use Docker
docker model run hf.co/axyzdong/AMchat-GGUF:AMchat GGUF Model
AM (Advanced Mathematics) Chat is a large-scale language model that integrates mathematical knowledge, advanced mathematics problems, and their solutions. This model utilizes a dataset that combines Math and advanced mathematics problems with their analyses. It is based on the InternLM2-Math-7B model and has been fine-tuned with xtuner, specifically designed to solve advanced mathematics problems.
Latest Release
2024-08-16
- Q6_K
- Q5_K_M
- Q5_0
- Q4_0
- Q3_K_M
- Q2_K
2024-08-09
- F16 Quantization: Achieves a balanced trade-off between model size and performance. Ideal for applications requiring precision with reduced resource consumption.
- Q8_0 Quantization: Offers a substantial reduction in model size while maintaining high accuracy, making it suitable for environments with stringent memory constraints.
- Q4_K_M Quantization: Provides the most compact model size with minimal impact on performance, perfect for deployment in resource-constrained settings.
Getting Started - Ollama
To get started with AMchat in Ollama, follow these steps:
Clone the Repository
git lfs install git clone https://huggingface.co/axyzdong/AMchat-GGUFCreat Model
Make sure you have installed ollama in advance. https://ollama.com/
ollama create AMchat -f ModelfileRun
ollama run AMchat
Getting Started - llama-cli
You can use llama-cli for conducting inference. For a detailed explanation of llama-cli, please refer to this guide
Installation
We recommend building llama.cpp from source. The following code snippet provides an example for the Linux CUDA platform. For instructions on other platforms, please refer to the official guide.
- Step 1: create a conda environment and install cmake
conda create --name AMchat python=3.10 -y
conda activate AMchat
pip install cmake
- Step 2: clone the source code and build the project
git clone --depth=1 https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j
All the built targets can be found in the sub directory build/bin
In the following sections, we assume that the working directory is at the root directory of llama.cpp.
Download models
You can download the appropriate model based on your requirements.
For instance, AMchat-q8_0.gguf can be downloaded as below:
pip install huggingface-hub
huggingface-cli download axyzdong/AMchat-GGUF AMchat-q8_0.gguf --local-dir . --local-dir-use-symlinks False
chat example
build/bin/llama-cli \
--model AMchat-fp16.gguf \
--predict 512 \
--ctx-size 4096 \
--gpu-layers 24 \
--temp 0.8 \
--top-p 0.8 \
--top-k 50 \
--seed 1024 \
--color \
--prompt "<|im_start|>system\nYou are an expert in advanced math and you can answer all kinds of advanced math problems.<|im_end|>\n" \
--interactive \
--multiline-input \
--conversation \
--verbose \
--logdir workdir/logdir \
--in-prefix "<|im_start|>user\n" \
--in-suffix "<|im_end|>\n<|im_start|>assistant\n"
Star Us
If you find AMchat useful, please ⭐ Star this repository and help others discover it!
- Downloads last month
- 48
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf axyzdong/AMchat-GGUF:# Run inference directly in the terminal: llama-cli -hf axyzdong/AMchat-GGUF: