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
| extern "C" { | |
| typedef struct ggml_backend_buffer_type * ggml_backend_buffer_type_t; | |
| typedef struct ggml_backend_buffer * ggml_backend_buffer_t; | |
| typedef struct ggml_backend * ggml_backend_t; | |
| // Tensor allocator | |
| struct ggml_tallocr { | |
| ggml_backend_buffer_t buffer; | |
| void * base; | |
| size_t alignment; | |
| size_t offset; | |
| }; | |
| GGML_API struct ggml_tallocr ggml_tallocr_new(ggml_backend_buffer_t buffer); | |
| GGML_API enum ggml_status ggml_tallocr_alloc(struct ggml_tallocr * talloc, struct ggml_tensor * tensor); | |
| // Graph allocator | |
| /* | |
| Example usage: | |
| ggml_gallocr_t galloc = ggml_gallocr_new(ggml_backend_cpu_buffer_type()); | |
| // optional: create a worst-case graph and reserve the buffers to avoid reallocations | |
| ggml_gallocr_reserve(galloc, build_graph(max_batch)); | |
| // allocate the graph | |
| struct ggml_cgraph * graph = build_graph(batch); | |
| ggml_gallocr_alloc_graph(galloc, graph); | |
| printf("compute buffer size: %zu bytes\n", ggml_gallocr_get_buffer_size(galloc, 0)); | |
| // evaluate the graph | |
| ggml_backend_graph_compute(backend, graph); | |
| */ | |
| // special tensor flags for use with the graph allocator: | |
| // ggml_set_input(): all input tensors are allocated at the beginning of the graph in non-overlapping addresses | |
| // ggml_set_output(): output tensors are never freed and never overwritten | |
| typedef struct ggml_gallocr * ggml_gallocr_t; | |
| GGML_API ggml_gallocr_t ggml_gallocr_new(ggml_backend_buffer_type_t buft); | |
| GGML_API ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs); | |
| GGML_API void ggml_gallocr_free(ggml_gallocr_t galloc); | |
| // pre-allocate buffers from a measure graph - does not allocate or modify the graph | |
| // call with a worst-case graph to avoid buffer reallocations | |
| // not strictly required for single buffer usage: ggml_gallocr_alloc_graph will reallocate the buffers automatically if needed | |
| // returns false if the buffer allocation failed | |
| // ggml_gallocr_resrve_n_size writes the buffer sizes per galloc buffer that would be allocated by ggml_gallocr_reserve_n to sizes | |
| GGML_API bool ggml_gallocr_reserve(ggml_gallocr_t galloc, struct ggml_cgraph * graph); | |
| GGML_API void ggml_gallocr_reserve_n_size( | |
| ggml_gallocr_t galloc, | |
| struct ggml_cgraph * graph, | |
| const int * node_buffer_ids, | |
| const int * leaf_buffer_ids, | |
| size_t * sizes); | |
| GGML_API bool ggml_gallocr_reserve_n( | |
| ggml_gallocr_t galloc, | |
| struct ggml_cgraph * graph, | |
| const int * node_buffer_ids, | |
| const int * leaf_buffer_ids); | |
| // automatic reallocation if the topology changes when using a single buffer | |
| // returns false if using multiple buffers and a re-allocation is needed (call ggml_gallocr_reserve_n first to set the node buffers) | |
| GGML_API bool ggml_gallocr_alloc_graph(ggml_gallocr_t galloc, struct ggml_cgraph * graph); | |
| GGML_API size_t ggml_gallocr_get_buffer_size(ggml_gallocr_t galloc, int buffer_id); | |
| // Utils | |
| // Create a buffer and allocate all the tensors in a ggml_context | |
| // ggml_backend_alloc_ctx_tensors_from_buft_size returns the size of the buffer that would be allocated by ggml_backend_alloc_ctx_tensors_from_buft | |
| // ggml_backend_alloc_ctx_tensors_from_buft returns NULL on failure or if all tensors in ctx are already allocated or zero-sized | |
| GGML_API size_t ggml_backend_alloc_ctx_tensors_from_buft_size(struct ggml_context * ctx, ggml_backend_buffer_type_t buft); | |
| GGML_API struct ggml_backend_buffer * ggml_backend_alloc_ctx_tensors_from_buft(struct ggml_context * ctx, ggml_backend_buffer_type_t buft); | |
| GGML_API struct ggml_backend_buffer * ggml_backend_alloc_ctx_tensors(struct ggml_context * ctx, ggml_backend_t backend); | |
| } | |