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
| #!/usr/bin/env python3 | |
| from __future__ import annotations | |
| import uuid | |
| import hashlib | |
| import logging | |
| import argparse | |
| import os | |
| import sys | |
| from pathlib import Path | |
| from tqdm import tqdm | |
| # Necessary to load the local gguf package | |
| if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists(): | |
| sys.path.insert(0, str(Path(__file__).parent.parent.parent)) | |
| from gguf import GGUFReader # noqa: E402 | |
| logger = logging.getLogger("gguf-hash") | |
| # UUID_NAMESPACE_LLAMA_CPP = uuid.uuid5(uuid.NAMESPACE_URL, 'en.wikipedia.org/wiki/Llama.cpp') | |
| UUID_NAMESPACE_LLAMA_CPP = uuid.UUID('ef001206-dadc-5f6d-a15f-3359e577d4e5') | |
| # For more information about what field.parts and field.data represent, | |
| # please see the comments in the modify_gguf.py example. | |
| def gguf_hash(reader: GGUFReader, filename: str, disable_progress_bar: bool, no_layer: bool) -> None: | |
| sha1 = hashlib.sha1() | |
| sha256 = hashlib.sha256() | |
| uuidv5_sha1 = hashlib.sha1() | |
| uuidv5_sha1.update(UUID_NAMESPACE_LLAMA_CPP.bytes) | |
| # Total Weight Calculation For Progress Bar | |
| total_weights = 0 | |
| for n, tensor in enumerate(reader.tensors, 1): | |
| # We don't need these | |
| if tensor.name.endswith((".attention.masked_bias", ".attention.bias", ".rotary_emb.inv_freq")): | |
| continue | |
| # Calculate Tensor Volume | |
| sum_weights_in_tensor = 1 | |
| for dim in tensor.shape: | |
| sum_weights_in_tensor *= dim | |
| total_weights += sum_weights_in_tensor | |
| # Hash Progress Bar | |
| bar = tqdm(desc="Hashing", total=total_weights, unit="weights", unit_scale=True, disable=disable_progress_bar) | |
| # Hashing Process | |
| for tensor in reader.tensors: | |
| # We don't need these | |
| if tensor.name.endswith((".attention.masked_bias", ".attention.bias", ".rotary_emb.inv_freq")): | |
| continue | |
| # Progressbar | |
| sum_weights_in_tensor = 1 | |
| for dim in tensor.shape: | |
| sum_weights_in_tensor *= dim | |
| bar.update(sum_weights_in_tensor) | |
| if not no_layer: | |
| sha1_layer = hashlib.sha1() | |
| sha1_layer.update(tensor.data.data) | |
| print("sha1 {0} {1}:{2}".format(sha1_layer.hexdigest(), filename, tensor.name)) # noqa: NP100 | |
| sha256_layer = hashlib.sha256() | |
| sha256_layer.update(tensor.data.data) | |
| print("sha256 {0} {1}:{2}".format(sha256_layer.hexdigest(), filename, tensor.name)) # noqa: NP100 | |
| sha1.update(tensor.data.data) | |
| sha256.update(tensor.data.data) | |
| uuidv5_sha1.update(tensor.data.data) | |
| # Flush Hash Progress Bar | |
| bar.close() | |
| # Display Hash Output | |
| print("sha1 {0} {1}".format(sha1.hexdigest(), filename)) # noqa: NP100 | |
| print("sha256 {0} {1}".format(sha256.hexdigest(), filename)) # noqa: NP100 | |
| print("uuid {0} {1}".format(uuid.UUID(bytes=uuidv5_sha1.digest()[:16], version=5), filename)) # noqa: NP100 | |
| def main() -> None: | |
| parser = argparse.ArgumentParser(description="Dump GGUF file metadata") | |
| parser.add_argument("model", type=str, help="GGUF format model filename") | |
| parser.add_argument("--no-layer", action="store_true", help="exclude per layer hash") | |
| parser.add_argument("--verbose", action="store_true", help="increase output verbosity") | |
| parser.add_argument("--progressbar", action="store_true", help="enable progressbar") | |
| args = parser.parse_args(None if len(sys.argv) > 1 else ["--help"]) | |
| logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) | |
| reader = GGUFReader(args.model, 'r') | |
| gguf_hash(reader, args.model, not args.progressbar, args.no_layer) | |
| if __name__ == '__main__': | |
| main() | |