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 | |
| // | |
| static void conv_transpose_1d_kernel( | |
| const int s0, const int output_size, | |
| const int src0_ne0, const int src0_ne1, const int src0_ne2, | |
| const int src1_ne0, const int dst_ne0, | |
| const float * src0, const float * src1, float * dst, | |
| const sycl::nd_item<3> &item_ct1) { | |
| int global_index = item_ct1.get_local_id(2) + | |
| item_ct1.get_group(2) * item_ct1.get_local_range(2); | |
| if (global_index >= output_size) { | |
| return; | |
| } | |
| int out_index = global_index / dst_ne0; | |
| float accumulator = 0; | |
| for (int c = 0; c < src0_ne2; c++) { | |
| int idx = global_index % dst_ne0; | |
| int kernel_offset = (src0_ne0 * src0_ne1 * c) + (out_index * src0_ne0); | |
| int input_offset = src1_ne0 * c; | |
| for (int i = 0; i < src1_ne0; i++) { | |
| if (!(idx >= i*s0 && idx < i*s0 + src0_ne0)) { | |
| continue; | |
| } | |
| int weight_idx = idx - i*s0; | |
| float kernel_weight = src0[kernel_offset + weight_idx]; | |
| float input_value = src1[input_offset+i]; | |
| accumulator += kernel_weight * input_value; | |
| } | |
| } | |
| dst[global_index] = accumulator; | |
| } | |
| static void conv_transpose_1d_f32_f32_sycl( | |
| const int s0, const int output_size, | |
| const int src0_ne0, const int src0_ne1, const int src0_ne2, | |
| const int src1_ne0, const int dst_ne0, | |
| const float *src0, const float *src1, float *dst, | |
| const queue_ptr& stream) { | |
| const int num_blocks = (output_size + SYCL_CONV_TRANPOSE_1D_BLOCK_SIZE - 1) / SYCL_CONV_TRANPOSE_1D_BLOCK_SIZE; | |
| const sycl::range<3> block_dims(1, 1, SYCL_CONV_TRANPOSE_1D_BLOCK_SIZE); | |
| const sycl::range<3> block_nums(1, 1, num_blocks); | |
| stream->parallel_for( | |
| sycl::nd_range<3>( | |
| block_nums * block_dims, block_dims), | |
| [=](sycl::nd_item<3> item_ct1) { | |
| conv_transpose_1d_kernel( | |
| s0, output_size, | |
| src0_ne0, src0_ne1, src0_ne2, | |
| src1_ne0, dst_ne0, | |
| src0, src1, dst, item_ct1); | |
| }); | |
| } | |
| void ggml_sycl_op_conv_transpose_1d(ggml_backend_sycl_context & ctx, ggml_tensor *dst) { | |
| scope_op_debug_print scope_dbg_print(__func__, dst, /*num_src=*/2); | |
| const ggml_tensor *src0 = dst->src[0]; | |
| const ggml_tensor *src1 = dst->src[1]; | |
| const float * src0_d = (const float *)src0->data; | |
| const float * src1_d = (const float *)src1->data; | |
| float * dst_d = (float *)dst->data; | |
| dpct::queue_ptr stream = ctx.stream(); | |
| GGML_ASSERT(src0->type == GGML_TYPE_F32); | |
| GGML_ASSERT( dst->type == GGML_TYPE_F32); | |
| GGML_ASSERT(ggml_is_contiguous(src0)); | |
| GGML_ASSERT(ggml_is_contiguous(src1)); | |
| const int32_t * opts = (const int32_t *)dst->op_params; | |
| const int s0 = opts[0]; | |
| const int64_t output_size = ggml_nelements(dst); | |
| conv_transpose_1d_f32_f32_sycl(s0, output_size, | |
| src0->ne[0], src0->ne[1], src0->ne[2], | |
| src1->ne[0], dst->ne[0], | |
| src0_d, src1_d, dst_d, stream); | |
| } | |