Instructions to use PeterCha/TCOD-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use PeterCha/TCOD-models with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="PeterCha/TCOD-models", filename="LightOnOCR-2-1B-IQ4_NL.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use PeterCha/TCOD-models with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf PeterCha/TCOD-models:IQ4_NL # Run inference directly in the terminal: llama-cli -hf PeterCha/TCOD-models:IQ4_NL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf PeterCha/TCOD-models:IQ4_NL # Run inference directly in the terminal: llama-cli -hf PeterCha/TCOD-models:IQ4_NL
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 PeterCha/TCOD-models:IQ4_NL # Run inference directly in the terminal: ./llama-cli -hf PeterCha/TCOD-models:IQ4_NL
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 PeterCha/TCOD-models:IQ4_NL # Run inference directly in the terminal: ./build/bin/llama-cli -hf PeterCha/TCOD-models:IQ4_NL
Use Docker
docker model run hf.co/PeterCha/TCOD-models:IQ4_NL
- LM Studio
- Jan
- Ollama
How to use PeterCha/TCOD-models with Ollama:
ollama run hf.co/PeterCha/TCOD-models:IQ4_NL
- Unsloth Studio new
How to use PeterCha/TCOD-models 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 PeterCha/TCOD-models 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 PeterCha/TCOD-models to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for PeterCha/TCOD-models to start chatting
- Docker Model Runner
How to use PeterCha/TCOD-models with Docker Model Runner:
docker model run hf.co/PeterCha/TCOD-models:IQ4_NL
- Lemonade
How to use PeterCha/TCOD-models with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull PeterCha/TCOD-models:IQ4_NL
Run and chat with the model
lemonade run user.TCOD-models-IQ4_NL
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +3 -0
- madlad-onnx-Q4/config.json +33 -0
- madlad-onnx-Q4/decoder_model.onnx +3 -0
- madlad-onnx-Q4/decoder_model.onnx.data +3 -0
- madlad-onnx-Q4/encoder_model.onnx +3 -0
- madlad-onnx-Q4/encoder_model.onnx.data +3 -0
- madlad-onnx-Q4/generation_config.json +7 -0
- madlad-onnx-Q4/special_tokens_map.json +23 -0
- madlad-onnx-Q4/tokenizer.json +3 -0
- madlad-onnx-Q4/tokenizer_config.json +40 -0
.gitattributes
CHANGED
|
@@ -54,3 +54,6 @@ opus-onnx/en-ko-Q8/target.spm filter=lfs diff=lfs merge=lfs -text
|
|
| 54 |
opus-onnx/ko-en-Q8/source.spm filter=lfs diff=lfs merge=lfs -text
|
| 55 |
opus-onnx/ko-en-Q8/target.spm filter=lfs diff=lfs merge=lfs -text
|
| 56 |
madlad-onnx-Q8/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
opus-onnx/ko-en-Q8/source.spm filter=lfs diff=lfs merge=lfs -text
|
| 55 |
opus-onnx/ko-en-Q8/target.spm filter=lfs diff=lfs merge=lfs -text
|
| 56 |
madlad-onnx-Q8/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
madlad-onnx-Q4/decoder_model.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
madlad-onnx-Q4/encoder_model.onnx.data filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
madlad-onnx-Q4/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
madlad-onnx-Q4/config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"T5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"classifier_dropout": 0.0,
|
| 6 |
+
"d_ff": 8192,
|
| 7 |
+
"d_kv": 128,
|
| 8 |
+
"d_model": 1024,
|
| 9 |
+
"decoder_start_token_id": 0,
|
| 10 |
+
"dense_act_fn": "gelu_new",
|
| 11 |
+
"dropout_rate": 0.1,
|
| 12 |
+
"dtype": "float32",
|
| 13 |
+
"eos_token_id": 2,
|
| 14 |
+
"feed_forward_proj": "gated-gelu",
|
| 15 |
+
"initializer_factor": 1.0,
|
| 16 |
+
"is_encoder_decoder": true,
|
| 17 |
+
"is_gated_act": true,
|
| 18 |
+
"layer_norm_epsilon": 1e-06,
|
| 19 |
+
"model_type": "t5",
|
| 20 |
+
"n_positions": 512,
|
| 21 |
+
"num_decoder_layers": 32,
|
| 22 |
+
"num_heads": 16,
|
| 23 |
+
"num_layers": 32,
|
| 24 |
+
"output_past": true,
|
| 25 |
+
"pad_token_id": 1,
|
| 26 |
+
"relative_attention_max_distance": 128,
|
| 27 |
+
"relative_attention_num_buckets": 32,
|
| 28 |
+
"task_specific_params": {},
|
| 29 |
+
"tie_word_embeddings": false,
|
| 30 |
+
"transformers_version": "4.57.6",
|
| 31 |
+
"use_cache": false,
|
| 32 |
+
"vocab_size": 256000
|
| 33 |
+
}
|
madlad-onnx-Q4/decoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49b35493b8e5643e4c89ce79cc077e7009ac7a992f2328f5681be0660fe5b272
|
| 3 |
+
size 1568880
|
madlad-onnx-Q4/decoder_model.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a5e3c94daeaa2080bff36cbd06ac5c0dae6b68ff101367982e375d24cc674330
|
| 3 |
+
size 991956992
|
madlad-onnx-Q4/encoder_model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04f3adf9e74c90c2cd366ac92fcf59859bf37f6c03dff21e3a8bf520f4f1e654
|
| 3 |
+
size 838968
|
madlad-onnx-Q4/encoder_model.onnx.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d28ce24f8d77653d1cd775ae25de6b78eb040a4636c3243ae974141cb7bc512b
|
| 3 |
+
size 709955584
|
madlad-onnx-Q4/generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"decoder_start_token_id": 0,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 1,
|
| 6 |
+
"transformers_version": "4.57.6"
|
| 7 |
+
}
|
madlad-onnx-Q4/special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eos_token": {
|
| 3 |
+
"content": "</s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"pad_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"unk_token": {
|
| 17 |
+
"content": "<unk>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
madlad-onnx-Q4/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03f5d7dc88da0cb4bb6b7a1d9d66ee62f5bd339ef0aaaf6e89d74829df5830c0
|
| 3 |
+
size 16613995
|
madlad-onnx-Q4/tokenizer_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": null,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<unk>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<s>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"additional_special_tokens": [],
|
| 30 |
+
"clean_up_tokenization_spaces": true,
|
| 31 |
+
"eos_token": "</s>",
|
| 32 |
+
"extra_ids": 0,
|
| 33 |
+
"extra_special_tokens": {},
|
| 34 |
+
"legacy": false,
|
| 35 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 36 |
+
"pad_token": "<s>",
|
| 37 |
+
"sp_model_kwargs": {},
|
| 38 |
+
"tokenizer_class": "T5Tokenizer",
|
| 39 |
+
"unk_token": "<unk>"
|
| 40 |
+
}
|