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
| // pseudo-env variable to identify preset-only arguments | |
| // | |
| // CLI argument parsing | |
| // | |
| struct common_arg { | |
| std::set<enum llama_example> examples = {LLAMA_EXAMPLE_COMMON}; | |
| std::set<enum llama_example> excludes = {}; | |
| std::vector<const char *> args; | |
| std::vector<const char *> args_neg; // for negated args like --no-xxx | |
| const char * value_hint = nullptr; // help text or example for arg value | |
| const char * value_hint_2 = nullptr; // for second arg value | |
| const char * env = nullptr; | |
| std::string help; | |
| bool is_sampling = false; // is current arg a sampling param? | |
| bool is_spec = false; // is current arg a speculative decoding param? | |
| bool is_preset_only = false; // is current arg preset-only (not treated as CLI arg) | |
| void (*handler_void) (common_params & params) = nullptr; | |
| void (*handler_string) (common_params & params, const std::string &) = nullptr; | |
| void (*handler_str_str)(common_params & params, const std::string &, const std::string &) = nullptr; | |
| void (*handler_int) (common_params & params, int) = nullptr; | |
| void (*handler_bool) (common_params & params, bool) = nullptr; | |
| common_arg() = default; | |
| common_arg( | |
| const std::initializer_list<const char *> & args, | |
| const char * value_hint, | |
| const std::string & help, | |
| void (*handler)(common_params & params, const std::string &) | |
| ) : args(args), value_hint(value_hint), help(help), handler_string(handler) {} | |
| common_arg( | |
| const std::initializer_list<const char *> & args, | |
| const char * value_hint, | |
| const std::string & help, | |
| void (*handler)(common_params & params, int) | |
| ) : args(args), value_hint(value_hint), help(help), handler_int(handler) {} | |
| common_arg( | |
| const std::initializer_list<const char *> & args, | |
| const std::string & help, | |
| void (*handler)(common_params & params) | |
| ) : args(args), help(help), handler_void(handler) {} | |
| common_arg( | |
| const std::initializer_list<const char *> & args, | |
| const std::initializer_list<const char *> & args_neg, | |
| const std::string & help, | |
| void (*handler)(common_params & params, bool) | |
| ) : args(args), args_neg(args_neg), help(help), handler_bool(handler) {} | |
| // support 2 values for arg | |
| common_arg( | |
| const std::initializer_list<const char *> & args, | |
| const char * value_hint, | |
| const char * value_hint_2, | |
| const std::string & help, | |
| void (*handler)(common_params & params, const std::string &, const std::string &) | |
| ) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {} | |
| common_arg & set_examples(std::initializer_list<enum llama_example> examples); | |
| common_arg & set_excludes(std::initializer_list<enum llama_example> excludes); | |
| common_arg & set_env(const char * env); | |
| common_arg & set_sampling(); | |
| common_arg & set_spec(); | |
| common_arg & set_preset_only(); | |
| bool in_example(enum llama_example ex); | |
| bool is_exclude(enum llama_example ex); | |
| bool get_value_from_env(std::string & output) const; | |
| bool has_value_from_env() const; | |
| std::string to_string() const; | |
| // for using as key in std::map | |
| bool operator<(const common_arg& other) const { | |
| if (args.empty() || other.args.empty()) { | |
| return false; | |
| } | |
| return strcmp(args[0], other.args[0]) < 0; | |
| } | |
| bool operator==(const common_arg& other) const { | |
| if (args.empty() || other.args.empty()) { | |
| return false; | |
| } | |
| return strcmp(args[0], other.args[0]) == 0; | |
| } | |
| // get all args and env vars (including negated args/env) | |
| std::vector<std::string> get_args() const; | |
| std::vector<std::string> get_env() const; | |
| }; | |
| namespace common_arg_utils { | |
| bool is_truthy(const std::string & value); | |
| bool is_falsey(const std::string & value); | |
| bool is_autoy(const std::string & value); | |
| } | |
| struct common_params_context { | |
| enum llama_example ex = LLAMA_EXAMPLE_COMMON; | |
| common_params & params; | |
| std::vector<common_arg> options; | |
| void(*print_usage)(int, char **) = nullptr; | |
| common_params_context(common_params & params) : params(params) {} | |
| }; | |
| // parse input arguments from CLI | |
| // if one argument has invalid value, it will automatically display usage of the specific argument (and not the full usage message) | |
| bool common_params_parse(int argc, char ** argv, common_params & params, llama_example ex, void(*print_usage)(int, char **) = nullptr); | |
| // parse input arguments from CLI into a map | |
| bool common_params_to_map(int argc, char ** argv, llama_example ex, std::map<common_arg, std::string> & out_map); | |
| // populate preset-only arguments | |
| // these arguments are not treated as command line arguments | |
| // see: https://github.com/ggml-org/llama.cpp/issues/18163 | |
| void common_params_add_preset_options(std::vector<common_arg> & args); | |
| struct common_models_handler { | |
| common_download_hf_plan plan; | |
| common_download_hf_plan plan_spec; | |
| common_download_hf_plan plan_voc; | |
| common_download_opts opts; | |
| }; | |
| // initialize downloading opts and hf_plan if needed, but does not download anything yet | |
| common_models_handler common_models_handler_init(const common_params & params, llama_example curr_ex); | |
| // check if the model is a preset repo (i.e. has a preset file) | |
| bool common_models_handler_is_preset_repo(const common_models_handler & handler); | |
| // download and update params with the downloaded model path | |
| void common_models_handler_apply(common_models_handler & handler, common_params & params, common_download_callback * callback = nullptr); | |
| // initialize argument parser context - used by test-arg-parser and preset | |
| common_params_context common_params_parser_init(common_params & params, llama_example ex, void(*print_usage)(int, char **) = nullptr); | |