Safetensors
GGUF
Turkish
llama
Llama-3
instruct
finetune
chatml
gpt4
synthetic data
distillation
function calling
json mode
axolotl
roleplaying
chat
Instructions to use tda45/TdAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tda45/TdAI with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tda45/TdAI", filename="llama.cpp/models/ggml-vocab-aquila.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 tda45/TdAI 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 tda45/TdAI # Run inference directly in the terminal: llama cli -hf tda45/TdAI
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tda45/TdAI # Run inference directly in the terminal: llama cli -hf tda45/TdAI
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 tda45/TdAI # Run inference directly in the terminal: ./llama-cli -hf tda45/TdAI
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 tda45/TdAI # Run inference directly in the terminal: ./build/bin/llama-cli -hf tda45/TdAI
Use Docker
docker model run hf.co/tda45/TdAI
- LM Studio
- Jan
- Ollama
How to use tda45/TdAI with Ollama:
ollama run hf.co/tda45/TdAI
- Unsloth Studio
How to use tda45/TdAI 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 tda45/TdAI 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 tda45/TdAI to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tda45/TdAI to start chatting
- Atomic Chat new
- Docker Model Runner
How to use tda45/TdAI with Docker Model Runner:
docker model run hf.co/tda45/TdAI
- Lemonade
How to use tda45/TdAI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tda45/TdAI
Run and chat with the model
lemonade run user.TdAI-{{QUANT_TAG}}List all available models
lemonade list
| ## Overview | |
| > [!IMPORTANT] | |
| > This example and the RPC backend are currently in a proof-of-concept development stage. As such, the functionality is fragile and | |
| > insecure. **Never run the RPC server on an open network or in a sensitive environment!** | |
| The `ggml-rpc-server` allows exposing `ggml` devices on a remote host. | |
| The RPC backend communicates with one or several instances of `ggml-rpc-server` and offloads computations to them. | |
| This can be used for distributed LLM inference with `llama.cpp` in the following way: | |
| ```mermaid | |
| flowchart TD | |
| rpcb<-->|TCP|srva | |
| rpcb<-->|TCP|srvb | |
| rpcb<-.->|TCP|srvn | |
| subgraph hostn[Host N] | |
| srvn[ggml-rpc-server]<-.->dev4["CUDA0"] | |
| srvn[ggml-rpc-server]<-.->dev5["CPU"] | |
| end | |
| subgraph hostb[Host B] | |
| srvb[ggml-rpc-server]<-->dev3["Metal"] | |
| end | |
| subgraph hosta[Host A] | |
| srva[ggml-rpc-server]<-->dev["CUDA0"] | |
| srva[ggml-rpc-server]<-->dev2["CUDA1"] | |
| end | |
| subgraph host[Main Host] | |
| local["Local devices"]<-->ggml[llama-cli] | |
| ggml[llama-cli]<-->rpcb[RPC backend] | |
| end | |
| style hostn stroke:#66,stroke-width:2px,stroke-dasharray: 5 5 | |
| classDef devcls fill:#5B9BD5 | |
| class local,dev,dev2,dev3,dev4,dev5 devcls | |
| ``` | |
| By default, `ggml-rpc-server` exposes all available accelerator devices on the host. | |
| If there are no accelerators, it exposes a single `CPU` device. | |
| ## Usage | |
| ### Remote hosts | |
| On each remote host, build the backends for each accelerator by adding `-DGGML_RPC=ON` to the build options. | |
| For example, to build the `ggml-rpc-server` with support for CUDA accelerators: | |
| ```bash | |
| mkdir build-rpc-cuda | |
| cd build-rpc-cuda | |
| cmake .. -DGGML_CUDA=ON -DGGML_RPC=ON | |
| cmake --build . --config Release | |
| ``` | |
| When started, the `ggml-rpc-server` will detect and expose all available `CUDA` devices: | |
| ```bash | |
| $ bin/ggml-rpc-server | |
| ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no | |
| ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no | |
| ggml_cuda_init: found 1 CUDA devices: | |
| Device 0: NVIDIA GeForce RTX 5090, compute capability 12.0, VMM: yes | |
| Starting RPC server v3.0.0 | |
| endpoint : 127.0.0.1:50052 | |
| local cache : n/a | |
| Devices: | |
| CUDA0: NVIDIA GeForce RTX 5090 (32109 MiB, 31588 MiB free) | |
| ``` | |
| You can control the set of exposed CUDA devices with the `CUDA_VISIBLE_DEVICES` environment variable or the `--device` command line option. The following two commands have the same effect: | |
| ```bash | |
| $ CUDA_VISIBLE_DEVICES=0 bin/ggml-rpc-server -p 50052 | |
| $ bin/ggml-rpc-server --device CUDA0 -p 50052 | |
| ``` | |
| ### Main host | |
| On the main host build `llama.cpp` with the backends for the local devices and add `-DGGML_RPC=ON` to the build options. | |
| Finally, when running `llama-cli` or `llama-server`, use the `--rpc` option to specify the host and port of each `ggml-rpc-server`: | |
| ```bash | |
| $ llama-cli -hf ggml-org/gemma-3-1b-it-GGUF -ngl 99 --rpc 192.168.88.10:50052,192.168.88.11:50052 | |
| ``` | |
| By default, llama.cpp distributes model weights and the KV cache across all available devices -- both local and remote -- in proportion to each device's available memory. | |
| You can override this behavior with the `--tensor-split` option and set custom proportions when splitting tensor data across devices. | |
| ### Local cache | |
| The RPC server can use a local cache to store large tensors and avoid transferring them over the network. | |
| This can speed up model loading significantly, especially when using large models. | |
| To enable the cache, use the `-c` option: | |
| ```bash | |
| $ bin/ggml-rpc-server -c | |
| ``` | |
| By default, the cache is stored in the `$HOME/.cache/llama.cpp/rpc` directory and can be controlled via the `LLAMA_CACHE` environment variable. | |
| ### RDMA transport | |
| On Linux systems with RoCEv2-capable NICs (e.g. Mellanox ConnectX), the RPC backend can use RDMA instead of TCP for lower latency and higher throughput. The transport is negotiated automatically -- no changes to command-line usage are required. | |
| RDMA is enabled by default when `libibverbs` is found at build time. | |
| ### Troubleshooting | |
| Use the `GGML_RPC_DEBUG` environment variable to enable debug messages from `ggml-rpc-server`: | |
| ```bash | |
| $ GGML_RPC_DEBUG=1 bin/ggml-rpc-server | |
| ``` | |