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 common_params; | |
| struct stream_pipe_producer; // defined in server-stream.h | |
| // generator-like API for HTTP response generation | |
| // this object response with one of the 2 modes: | |
| // 1) normal response: `data` contains the full response body | |
| // 2) streaming response: each call to next(output) generates the next chunk | |
| // when next(output) returns false, no more data after the current chunk | |
| // note: some chunks can be empty, in which case no data is sent for that chunk | |
| struct server_http_res { | |
| std::string content_type = "application/json; charset=utf-8"; | |
| int status = 200; | |
| std::string data; | |
| std::map<std::string, std::string> headers; | |
| // if set, the stream survives a client disconnect: the producer pipe keeps draining into the | |
| // ring buffer and finalizes the session on destruction, so no explicit on_stream_end is needed. | |
| // shared_ptr (not unique_ptr) so the forward-declared type is safe to delete here. | |
| std::shared_ptr<stream_pipe_producer> spipe; | |
| std::function<bool(std::string &)> next = nullptr; | |
| bool is_stream() const { | |
| return next != nullptr; | |
| } | |
| // called when the session is cancelled (e.g. DELETE /v1/stream/<conv_id>). | |
| // server_res_generator overrides this to stop its reader; the default is a no-op. | |
| virtual void stop() {} | |
| virtual ~server_http_res() = default; | |
| }; | |
| // unique pointer, used by set_chunked_content_provider | |
| // httplib requires the stream provider to be stored in heap | |
| using server_http_res_ptr = std::unique_ptr<server_http_res>; | |
| using raw_buffer = std::vector<uint8_t>; | |
| struct uploaded_file { | |
| raw_buffer data; | |
| std::string filename; | |
| std::string content_type; | |
| }; | |
| struct server_http_req { | |
| std::map<std::string, std::string> params; // path_params + query_params | |
| std::map<std::string, std::string> headers; // used by MCP proxy | |
| std::string path; | |
| std::string query_string; // query parameters string (e.g. "action=save") | |
| std::string body; | |
| std::map<std::string, uploaded_file> files; // used for file uploads (form data) | |
| const std::function<bool()> & should_stop; | |
| std::string get_param(const std::string & key, const std::string & def = "") const { | |
| auto it = params.find(key); | |
| if (it != params.end()) { | |
| return it->second; | |
| } | |
| return def; | |
| } | |
| }; | |
| struct server_http_context { | |
| class Impl; | |
| std::unique_ptr<Impl> pimpl; | |
| std::thread thread; // server thread | |
| std::atomic<bool> is_ready = false; | |
| // note: the handler should never throw exceptions | |
| using handler_t = std::function<server_http_res_ptr(const server_http_req & req)>; | |
| mutable std::unordered_map<std::string, handler_t> handlers; | |
| std::string path_prefix; | |
| std::string hostname; | |
| int port = 8080; | |
| bool is_ssl = false; | |
| server_http_context(); | |
| ~server_http_context(); | |
| bool init(const common_params & params); | |
| bool start(); | |
| void stop() const; | |
| void get(const std::string & path, const handler_t & handler) const; | |
| void post(const std::string & path, const handler_t & handler) const; | |
| void del(const std::string & path, const handler_t & handler) const; | |
| // Register the Google Cloud Platform (Vertex AI) compat (AIP_PREDICT_ROUTE env var, or /predict) | |
| // Must be called AFTER all other API routes are registered | |
| void register_gcp_compat() const; | |
| // for debugging | |
| std::string listening_address; | |
| }; | |