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
| namespace jinja { | |
| struct token { | |
| enum type { | |
| eof, // end of source | |
| text, // The text between Jinja statements or expressions | |
| numeric_literal, // e.g., 123, 1.0 | |
| string_literal, // 'string' | |
| identifier, // Variables, functions, statements, booleans, etc. | |
| equals, // = | |
| open_paren, // ( | |
| close_paren, // ) | |
| open_statement, // {% | |
| close_statement, // %} | |
| open_expression, // {{ | |
| close_expression, // }} | |
| open_square_bracket, // [ | |
| close_square_bracket, // ] | |
| open_curly_bracket, // { | |
| close_curly_bracket, // } | |
| comma, // , | |
| dot, // . | |
| colon, // : | |
| pipe, // | | |
| call_operator, // () | |
| additive_binary_operator, // + - ~ | |
| multiplicative_binary_operator, // * / % | |
| comparison_binary_operator, // < > <= >= == != | |
| unary_operator, // ! - + | |
| comment, // {# ... #} | |
| }; | |
| type t; | |
| std::string value; | |
| size_t pos; | |
| }; | |
| static std::string type_to_string(token::type t) { | |
| switch (t) { | |
| case token::eof: return "eof"; | |
| case token::text: return "text"; | |
| case token::numeric_literal: return "numeric_literal"; | |
| case token::string_literal: return "string_literal"; | |
| case token::identifier: return "identifier"; | |
| case token::equals: return "equals"; | |
| case token::open_paren: return "open_paren"; | |
| case token::close_paren: return "close_paren"; | |
| case token::open_statement: return "open_statement"; | |
| case token::close_statement: return "close_statement"; | |
| case token::open_expression: return "open_expression"; | |
| case token::close_expression: return "close_expression"; | |
| case token::open_square_bracket: return "open_square_bracket"; | |
| case token::close_square_bracket: return "close_square_bracket"; | |
| case token::open_curly_bracket: return "open_curly_bracket"; | |
| case token::close_curly_bracket: return "close_curly_bracket"; | |
| case token::comma: return "comma"; | |
| case token::dot: return "dot"; | |
| case token::colon: return "colon"; | |
| case token::pipe: return "pipe"; | |
| case token::call_operator: return "call_operator"; | |
| case token::additive_binary_operator: return "additive_binary_operator"; | |
| case token::multiplicative_binary_operator: return "multiplicative_binary_operator"; | |
| case token::comparison_binary_operator: return "comparison_binary_operator"; | |
| case token::unary_operator: return "unary_operator"; | |
| case token::comment: return "comment"; | |
| default: return "unknown"; | |
| } | |
| } | |
| struct lexer_result { | |
| std::vector<token> tokens; | |
| std::string source; | |
| }; | |
| struct lexer { | |
| const std::map<char, char> escape_chars = { | |
| {'n', '\n'}, | |
| {'t', '\t'}, | |
| {'r', '\r'}, | |
| {'b', '\b'}, | |
| {'f', '\f'}, | |
| {'v', '\v'}, | |
| {'\\', '\\'}, | |
| {'\'', '\''}, | |
| {'\"', '\"'}, | |
| }; | |
| static bool is_word(char c) { | |
| return std::isalnum(static_cast<unsigned char>(c)) || c == '_'; | |
| } | |
| static bool is_integer(char c) { | |
| return std::isdigit(static_cast<unsigned char>(c)); | |
| } | |
| const std::vector<std::pair<std::string, token::type>> ordered_mapping_table = { | |
| // Trimmed control sequences | |
| {"{%-", token::open_statement}, | |
| {"-%}", token::close_statement}, | |
| {"{{-", token::open_expression}, | |
| {"-}}", token::close_expression}, | |
| // Control sequences | |
| {"{%", token::open_statement}, | |
| {"%}", token::close_statement}, | |
| {"{{", token::open_expression}, | |
| {"}}", token::close_expression}, | |
| // Single character tokens | |
| {"(", token::open_paren}, | |
| {")", token::close_paren}, | |
| {"{", token::open_curly_bracket}, | |
| {"}", token::close_curly_bracket}, | |
| {"[", token::open_square_bracket}, | |
| {"]", token::close_square_bracket}, | |
| {",", token::comma}, | |
| {".", token::dot}, | |
| {":", token::colon}, | |
| {"|", token::pipe}, | |
| // Comparison operators | |
| {"<=", token::comparison_binary_operator}, | |
| {">=", token::comparison_binary_operator}, | |
| {"==", token::comparison_binary_operator}, | |
| {"!=", token::comparison_binary_operator}, | |
| {"<", token::comparison_binary_operator}, | |
| {">", token::comparison_binary_operator}, | |
| // Arithmetic operators | |
| {"+", token::additive_binary_operator}, | |
| {"-", token::additive_binary_operator}, | |
| {"~", token::additive_binary_operator}, | |
| {"*", token::multiplicative_binary_operator}, | |
| {"/", token::multiplicative_binary_operator}, | |
| {"%", token::multiplicative_binary_operator}, | |
| // Assignment operator | |
| {"=", token::equals}, | |
| }; | |
| // tokenize the source string into a list of tokens | |
| // may throw lexer_exception on error | |
| lexer_result tokenize(const std::string & source); | |
| }; | |
| struct lexer_exception : public std::runtime_error { | |
| lexer_exception(const std::string & msg, const std::string & source, size_t pos) | |
| : std::runtime_error(fmt_error_with_source("lexer", msg, source, pos)) {} | |
| }; | |
| } // namespace jinja | |