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
| // | |
| // MIT license | |
| // Copyright (C) 2024 Intel Corporation | |
| // SPDX-License-Identifier: MIT | |
| // | |
| // | |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| // See https://llvm.org/LICENSE.txt for license information. | |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| // | |
| class DnnlGemmWrapper { | |
| public: | |
| using dt = dnnl::memory::data_type; | |
| using tag = dnnl::memory::format_tag; | |
| template<typename T> | |
| static constexpr dt to_dt() { | |
| if constexpr (std::is_same_v<T, float>) return dt::f32; | |
| else if constexpr (std::is_same_v<T, sycl::half>) return dt::f16; | |
| else if constexpr (std::is_same_v<T, sycl::ext::oneapi::bfloat16>) return dt::bf16; | |
| else static_assert(0); | |
| } | |
| static void gemm(ggml_backend_sycl_context & ctx, int m, int n, int k, | |
| const void * a, dt at, dnnl_dim_t stra0, dnnl_dim_t stra1, dnnl_dim_t stra2, | |
| const void * b, dt bt, dnnl_dim_t strb0, dnnl_dim_t strb1, dnnl_dim_t strb2, | |
| void * c, dt ct, const queue_ptr & q, dnnl_dim_t batches_a, dnnl_dim_t batches_b) { | |
| auto stream = ctx.stream_dnnl(q); | |
| auto eng = ctx.engine_dnnl(q); | |
| dnnl::memory::dims a_dims = {batches_a, m, k }; | |
| dnnl::memory::dims a_strides = {stra2, stra1, stra0}; | |
| const auto a_in_md = dnnl::memory::desc(a_dims, at, a_strides); | |
| dnnl::memory::dims b_dims = {batches_b, k, n }; | |
| dnnl::memory::dims b_strides = {strb2, strb0, strb1}; | |
| const auto b_in_md = dnnl::memory::desc(b_dims, bt, b_strides); | |
| dnnl::memory::dims c_dims = { std::max(batches_a, batches_b), m, n}; | |
| dnnl::memory::dims c_strides = {m*n, 1, m }; | |
| const auto c_md = dnnl::memory::desc(c_dims, ct, c_strides); | |
| dnnl::primitive_attr primitive_attr; | |
| primitive_attr.set_scratchpad_mode(dnnl::scratchpad_mode::user); | |
| primitive_attr.set_fpmath_mode(dnnl::fpmath_mode::f16); | |
| auto a_mem = dnnl::memory(a_in_md, eng, const_cast<void*>(a)); | |
| auto b_mem = dnnl::memory(b_in_md, eng, const_cast<void*>(b)); | |
| auto matmul_pd = dnnl::matmul::primitive_desc(eng, a_in_md, b_in_md, c_md, primitive_attr); | |
| auto c_mem = dnnl::memory(matmul_pd.dst_desc(), eng, c); | |
| auto scratchpad_md = matmul_pd.scratchpad_desc(); | |
| auto scratchpad_mem = ctx.get_scratchpad_mem(scratchpad_md, eng, q); | |
| auto matmul_prim = dnnl::matmul(matmul_pd); | |
| std::unordered_map<int, dnnl::memory> matmul_args; | |
| matmul_args.insert({ DNNL_ARG_SRC, a_mem }); | |
| matmul_args.insert({ DNNL_ARG_WEIGHTS, b_mem }); | |
| matmul_args.insert({ DNNL_ARG_DST, c_mem }); | |
| matmul_args.insert({ DNNL_ARG_SCRATCHPAD, scratchpad_mem }); | |
| matmul_prim.execute(stream, matmul_args); | |
| } | |
| static void row_gemm(ggml_backend_sycl_context & ctx, int m, int n, int k, | |
| const void * a, dt at, const void * b, dt bt, void * c, dt ct, const queue_ptr & q) { | |
| gemm(ctx, m, n, k, a, at, 1, k, k * m, b, bt, 1, k, n * k, c, ct, q, 1, 1); | |
| } | |
| }; | |