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
| struct build_vit_opts { | |
| ggml_tensor * attn_mask = nullptr; | |
| }; | |
| struct clip_graph { | |
| const clip_model & model; | |
| const clip_hparams & hparams; | |
| projector_type proj_type; | |
| // we only support single image per batch | |
| const clip_image_f32 & img; | |
| const int patch_size; | |
| const int n_patches_x; | |
| const int n_patches_y; | |
| const int n_patches; | |
| const int n_embd; | |
| const int n_head; | |
| const int n_head_kv; | |
| const int d_head; | |
| const int n_layer; | |
| const int n_mmproj_embd; | |
| const float eps; | |
| float kq_scale; // TODO: maybe move this to hparams | |
| const clip_flash_attn_type flash_attn_type; | |
| // TODO [QWEN_VIDEO]: improve this in the future | |
| int n_batch = 1; | |
| ggml_context_ptr ctx0_ptr; | |
| ggml_context * ctx0; | |
| ggml_cgraph * gf; | |
| clip_graph(clip_ctx * ctx, const clip_image_f32 & img); | |
| virtual ~clip_graph() = default; | |
| virtual ggml_cgraph * build() = 0; | |
| // wrapper around ggml_mul_mat, allow hooking (e.g. LoRA, clamping) depending on the model | |
| // tensor w should be the weight matrix, and tensor x should be the input | |
| virtual ggml_tensor * build_mm(ggml_tensor * w, ggml_tensor * x) const; | |
| // TODO: build_mm(w, b, x) to support bias | |
| virtual bool support_batch() const { | |
| return false; | |
| } | |
| // | |
| // utility functions | |
| // | |
| void cb(ggml_tensor * cur0, const char * name, int il) const; | |
| // siglip2 naflex | |
| ggml_tensor * resize_position_embeddings(uint32_t interpolation_mode = DEFAULT_INTERPOLATION_MODE); | |
| // build vision transformer (ViT) cgraph | |
| // this function should cover most of the models | |
| // if your model has specific features, you should probably duplicate this function | |
| ggml_tensor * build_vit( | |
| ggml_tensor * inp, | |
| int64_t n_pos, | |
| norm_type norm_t, | |
| ffn_op_type ffn_t, | |
| ggml_tensor * learned_pos_embd, | |
| std::function<ggml_tensor *(ggml_tensor *, const clip_layer &)> add_pos, | |
| const build_vit_opts & opts = {}); | |
| // build the input after conv2d (inp_raw --> patches) | |
| // returns tensor with shape [n_embd, n_patches] | |
| ggml_tensor * build_inp(); | |
| ggml_tensor * build_inp_raw(int channels = 3); | |
| ggml_tensor * build_norm( | |
| ggml_tensor * cur, | |
| ggml_tensor * mw, | |
| ggml_tensor * mb, | |
| norm_type type, | |
| float norm_eps, | |
| int il) const; | |
| ggml_tensor * build_ffn( | |
| ggml_tensor * cur, | |
| ggml_tensor * up, | |
| ggml_tensor * up_b, | |
| ggml_tensor * gate, | |
| ggml_tensor * gate_b, | |
| ggml_tensor * down, | |
| ggml_tensor * down_b, | |
| ffn_op_type type_op, | |
| int il) const; | |
| ggml_tensor * build_attn( | |
| ggml_tensor * wo, | |
| ggml_tensor * wo_b, | |
| ggml_tensor * q_cur, | |
| ggml_tensor * k_cur, | |
| ggml_tensor * v_cur, | |
| ggml_tensor * kq_mask, | |
| float kq_scale, | |
| int il, | |
| ggml_tensor * sinks = nullptr) const; | |
| // implementation of the 2D RoPE without adding a new op in ggml | |
| // this is not efficient (use double the memory), but works on all backends | |
| // TODO: there was a more efficient which relies on ggml_view and ggml_rope_ext_inplace, but the rope inplace does not work well with non-contiguous tensors ; we should fix that and revert back to the original implementation in https://github.com/ggml-org/llama.cpp/pull/13065 | |
| ggml_tensor * build_rope_2d( | |
| ggml_context * ctx0, | |
| ggml_tensor * cur, | |
| ggml_tensor * pos_a, // first half | |
| ggml_tensor * pos_b, // second half | |
| const float freq_base, | |
| const bool interleave_freq | |
| ); | |
| // aka pixel_shuffle / pixel_unshuffle / patch_merger (Kimi-VL) | |
| // support dynamic resolution | |
| ggml_tensor * build_patch_merge_permute(ggml_tensor * cur, int scale_factor); | |
| // Generic function to stack frames for audio processing | |
| // Abstracts out the StackAudioFrames logic used by ultravox | |
| ggml_tensor * build_stack(ggml_tensor * cur, int32_t stack_factor, int32_t n_embed); | |
| }; | |