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
| #include "conv2d-transpose.cuh" | |
| #include "convert.cuh" | |
| template <typename kernel_t> | |
| static __global__ void conv2d_transpose_kernel(const float * __restrict__ input, | |
| const kernel_t * __restrict__ kernel, | |
| float * __restrict__ output, | |
| const int in_w, | |
| const int in_h, | |
| const int out_w, | |
| const int out_h, | |
| const int kernel_w, | |
| const int kernel_h, | |
| const int stride, | |
| const int c_in, | |
| const int c_out, | |
| const int batches) { | |
| const int global_idx = blockIdx.x * blockDim.x + threadIdx.x; | |
| const int total_elements = out_w * out_h * c_out * batches; | |
| if (global_idx >= total_elements) { | |
| return; | |
| } | |
| const int out_x_idx = global_idx % out_w; | |
| const int out_y_idx = (global_idx / out_w) % out_h; | |
| const int c_idx = (global_idx / (out_w * out_h)) % c_out; | |
| const int n_idx = global_idx / (out_w * out_h * c_out); | |
| float accumulator = 0; | |
| // For each output idx, find the inputs that contribute to it by checking stride alignment and bounds | |
| for (int c_in_idx = 0; c_in_idx < c_in; c_in_idx++) { | |
| for (int kh = 0; kh < kernel_h; ++kh) { | |
| int in_y = out_y_idx - kh; | |
| if (in_y < 0 || in_y % stride) { | |
| continue; | |
| } | |
| in_y /= stride; | |
| if (in_y >= in_h) { | |
| continue; | |
| } | |
| for (int kw = 0; kw < kernel_w; ++kw) { | |
| int in_x = out_x_idx - kw; | |
| if (in_x < 0 || in_x % stride) { | |
| continue; | |
| } | |
| in_x /= stride; | |
| if (in_x >= in_w) { | |
| continue; | |
| } | |
| const int input_idx = (in_w * in_h * c_in) * n_idx + (in_w * in_h) * c_in_idx + (in_w) *in_y + in_x; | |
| const int kernel_idx = | |
| (kernel_h * kernel_w * c_out) * c_in_idx + (kernel_h * kernel_w) * c_idx + (kernel_w) *kh + kw; | |
| float input_val = input[input_idx]; | |
| kernel_t kern_val = kernel[kernel_idx]; | |
| accumulator += input_val * ggml_cuda_cast<float>(kern_val); | |
| } | |
| } | |
| } | |
| output[(out_w * out_h * c_out) * n_idx + (out_w * out_h) * c_idx + (out_w) *out_y_idx + out_x_idx] = accumulator; | |
| } | |
| //input is (W, H, C_in, N), Kernel is (W, H, C_out, C_in) | |
| void ggml_cuda_conv_2d_transpose_p0(ggml_backend_cuda_context & ctx, ggml_tensor * dst) { | |
| const ggml_tensor * kernel = dst->src[0]; | |
| const ggml_tensor * input = dst->src[1]; | |
| GGML_ASSERT(kernel->type == GGML_TYPE_F16 || kernel->type == GGML_TYPE_F32); | |
| GGML_ASSERT(input->type == GGML_TYPE_F32 && dst->type == GGML_TYPE_F32); | |
| const float * input_data = (const float *) input->data; | |
| float * output_data = (float *) dst->data; | |
| const void * kernel_data = kernel->data; | |
| const int input_w = input->ne[0]; | |
| const int input_h = input->ne[1]; | |
| const int output_w = dst->ne[0]; | |
| const int output_h = dst->ne[1]; | |
| const int channels_in = input->ne[2]; | |
| const int channels_out = kernel->ne[2]; | |
| const int kernel_w = kernel->ne[0]; | |
| const int kernel_h = kernel->ne[1]; | |
| const int stride = dst->op_params[0]; | |
| const int batches = input->ne[3]; | |
| GGML_ASSERT(channels_in == kernel->ne[3]); | |
| GGML_ASSERT(stride > 0); | |
| cudaStream_t st = ctx.stream(); | |
| GGML_ASSERT(ggml_is_contiguous(input)); | |
| GGML_ASSERT(ggml_is_contiguous(kernel)); | |
| GGML_ASSERT(ggml_is_contiguous(dst)); | |
| const int total = output_w * output_h * channels_out * batches; | |
| const int blocks = (total + CUDA_CONV2D_TRANSPOSE_BLOCK_SIZE - 1) / CUDA_CONV2D_TRANSPOSE_BLOCK_SIZE; | |
| if (kernel->type == GGML_TYPE_F16) { | |
| conv2d_transpose_kernel<half><<<blocks, CUDA_CONV2D_TRANSPOSE_BLOCK_SIZE, 0, st>>>( | |
| input_data, (const half *) kernel_data, output_data, input_w, input_h, output_w, output_h, kernel_w, | |
| kernel_h, stride, channels_in, channels_out, batches); | |
| } else { | |
| conv2d_transpose_kernel<float><<<blocks, CUDA_CONV2D_TRANSPOSE_BLOCK_SIZE, 0, st>>>( | |
| input_data, (const float *) kernel_data, output_data, input_w, input_h, output_w, output_h, kernel_w, | |
| kernel_h, stride, channels_in, channels_out, batches); | |
| } | |
| } | |