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
| import { AUTO_SCROLL_AT_BOTTOM_THRESHOLD, AUTO_SCROLL_INTERVAL } from '$lib/constants'; | |
| export interface AutoScrollOptions { | |
| disabled?: boolean; | |
| } | |
| /** | |
| * Creates an auto-scroll controller for a scrollable container. | |
| * | |
| * Features: | |
| * - Auto-scrolls to bottom during streaming/loading | |
| * - Stops auto-scroll when user manually scrolls up | |
| * - Resumes auto-scroll when user scrolls back to bottom | |
| */ | |
| export class AutoScrollController { | |
| private _autoScrollEnabled = $state(true); | |
| private _userScrolledUp = $state(false); | |
| private _lastScrollTop = $state(0); | |
| private _scrollInterval: ReturnType<typeof setInterval> | undefined; | |
| private _container: HTMLElement | undefined; | |
| private _disabled: boolean; | |
| private _mutationObserver: MutationObserver | null = null; | |
| private _rafPending = false; | |
| private _observerEnabled = false; | |
| constructor(options: AutoScrollOptions = {}) { | |
| this._disabled = options.disabled ?? false; | |
| } | |
| get autoScrollEnabled(): boolean { | |
| return this._autoScrollEnabled; | |
| } | |
| get userScrolledUp(): boolean { | |
| return this._userScrolledUp; | |
| } | |
| /** | |
| * Binds the controller to a scrollable container element. | |
| */ | |
| setContainer(container: HTMLElement | undefined): void { | |
| this._doStopObserving(); | |
| this._container = container; | |
| if (this._observerEnabled && container && !this._disabled) { | |
| this._doStartObserving(); | |
| } | |
| } | |
| /** | |
| * Updates the disabled state. | |
| */ | |
| setDisabled(disabled: boolean): void { | |
| if (this._disabled === disabled) return; | |
| this._disabled = disabled; | |
| if (disabled) { | |
| this._autoScrollEnabled = false; | |
| this.stopInterval(); | |
| this._doStopObserving(); | |
| } else if (this._observerEnabled && this._container && !this._mutationObserver) { | |
| this._doStartObserving(); | |
| } | |
| } | |
| /** | |
| * Handles scroll events to detect user scroll direction and toggle auto-scroll. | |
| */ | |
| handleScroll(): void { | |
| if (this._disabled || !this._container) return; | |
| const { scrollTop, scrollHeight, clientHeight } = this._container; | |
| const distanceFromBottom = scrollHeight - clientHeight - scrollTop; | |
| const isScrollingUp = scrollTop < this._lastScrollTop; | |
| const isAtBottom = distanceFromBottom < AUTO_SCROLL_AT_BOTTOM_THRESHOLD; | |
| if (isScrollingUp && !isAtBottom) { | |
| this._userScrolledUp = true; | |
| this._autoScrollEnabled = false; | |
| } else if (isAtBottom && this._userScrolledUp) { | |
| this._userScrolledUp = false; | |
| this._autoScrollEnabled = true; | |
| } | |
| this._lastScrollTop = scrollTop; | |
| } | |
| /** | |
| * Scrolls the container to the bottom. | |
| */ | |
| scrollToBottom(behavior: ScrollBehavior = 'smooth'): void { | |
| if (this._disabled || !this._container) return; | |
| this._container.scrollTo({ top: this._container.scrollHeight, behavior }); | |
| } | |
| /** | |
| * Enables auto-scroll (e.g., when user sends a message). | |
| */ | |
| enable(): void { | |
| if (this._disabled) return; | |
| this._userScrolledUp = false; | |
| this._autoScrollEnabled = true; | |
| } | |
| /** | |
| * Resets scroll state when switching conversations. | |
| */ | |
| resetScrollState(): void { | |
| this._userScrolledUp = false; | |
| this._autoScrollEnabled = !this._disabled; | |
| if (this._container) { | |
| this._lastScrollTop = this._container.scrollTop; | |
| } | |
| } | |
| /** | |
| * Starts the auto-scroll interval for continuous scrolling during streaming. | |
| */ | |
| startInterval(): void { | |
| if (this._disabled || this._scrollInterval) return; | |
| this._scrollInterval = setInterval(() => { | |
| this.scrollToBottom(); | |
| }, AUTO_SCROLL_INTERVAL); | |
| } | |
| /** | |
| * Stops the auto-scroll interval. | |
| */ | |
| stopInterval(): void { | |
| if (this._scrollInterval) { | |
| clearInterval(this._scrollInterval); | |
| this._scrollInterval = undefined; | |
| } | |
| } | |
| /** | |
| * Updates the auto-scroll interval based on streaming state. | |
| * Call this in a $effect to automatically manage the interval. | |
| */ | |
| updateInterval(isStreaming: boolean): void { | |
| if (this._disabled) { | |
| this.stopInterval(); | |
| return; | |
| } | |
| if (isStreaming && this._autoScrollEnabled) { | |
| if (!this._scrollInterval) { | |
| this.startInterval(); | |
| } | |
| } else { | |
| this.stopInterval(); | |
| } | |
| } | |
| /** | |
| * Cleans up resources. Call this in onDestroy or when the component unmounts. | |
| */ | |
| destroy(): void { | |
| this.stopInterval(); | |
| this._doStopObserving(); | |
| } | |
| /** | |
| * Starts a MutationObserver on the container that auto-scrolls to bottom | |
| * on content changes. More responsive than interval-based polling. | |
| */ | |
| startObserving(): void { | |
| this._observerEnabled = true; | |
| if (this._container && !this._disabled && !this._mutationObserver) { | |
| this._doStartObserving(); | |
| } | |
| } | |
| /** | |
| * Stops the MutationObserver. | |
| */ | |
| stopObserving(): void { | |
| this._observerEnabled = false; | |
| this._doStopObserving(); | |
| } | |
| private _doStartObserving(): void { | |
| if (!this._container || this._mutationObserver) return; | |
| this._mutationObserver = new MutationObserver(() => { | |
| if (!this._autoScrollEnabled || this._rafPending) return; | |
| this._rafPending = true; | |
| requestAnimationFrame(() => { | |
| this._rafPending = false; | |
| if (this._autoScrollEnabled && this._container) { | |
| this._container.scrollTop = this._container.scrollHeight; | |
| } | |
| }); | |
| }); | |
| this._mutationObserver.observe(this._container, { | |
| childList: true, | |
| subtree: true, | |
| characterData: true | |
| }); | |
| } | |
| private _doStopObserving(): void { | |
| if (this._mutationObserver) { | |
| this._mutationObserver.disconnect(); | |
| this._mutationObserver = null; | |
| } | |
| this._rafPending = false; | |
| } | |
| } | |
| /** | |
| * Creates a new AutoScrollController instance. | |
| */ | |
| export function createAutoScrollController(options: AutoScrollOptions = {}): AutoScrollController { | |
| return new AutoScrollController(options); | |
| } | |