Instructions to use TroyDoesAI/Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TroyDoesAI/Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TroyDoesAI/Mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TroyDoesAI/Mini") model = AutoModelForCausalLM.from_pretrained("TroyDoesAI/Mini") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TroyDoesAI/Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TroyDoesAI/Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TroyDoesAI/Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TroyDoesAI/Mini
- SGLang
How to use TroyDoesAI/Mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TroyDoesAI/Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TroyDoesAI/Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TroyDoesAI/Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TroyDoesAI/Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TroyDoesAI/Mini with Docker Model Runner:
docker model run hf.co/TroyDoesAI/Mini
Delete tokenizer_config.json
Browse files- tokenizer_config.json +0 -90
tokenizer_config.json
DELETED
|
@@ -1,90 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": true,
|
| 3 |
-
"add_eos_token": false,
|
| 4 |
-
"add_prefix_space": true,
|
| 5 |
-
"added_tokens_decoder": {
|
| 6 |
-
"0": {
|
| 7 |
-
"content": "<unk>",
|
| 8 |
-
"lstrip": false,
|
| 9 |
-
"normalized": false,
|
| 10 |
-
"rstrip": false,
|
| 11 |
-
"single_word": false,
|
| 12 |
-
"special": true
|
| 13 |
-
},
|
| 14 |
-
"1": {
|
| 15 |
-
"content": "<s>",
|
| 16 |
-
"lstrip": false,
|
| 17 |
-
"normalized": false,
|
| 18 |
-
"rstrip": false,
|
| 19 |
-
"single_word": false,
|
| 20 |
-
"special": true
|
| 21 |
-
},
|
| 22 |
-
"2": {
|
| 23 |
-
"content": "</s>",
|
| 24 |
-
"lstrip": false,
|
| 25 |
-
"normalized": false,
|
| 26 |
-
"rstrip": false,
|
| 27 |
-
"single_word": false,
|
| 28 |
-
"special": true
|
| 29 |
-
},
|
| 30 |
-
"3": {
|
| 31 |
-
"content": "[INST]",
|
| 32 |
-
"lstrip": false,
|
| 33 |
-
"normalized": true,
|
| 34 |
-
"rstrip": false,
|
| 35 |
-
"single_word": false,
|
| 36 |
-
"special": false
|
| 37 |
-
},
|
| 38 |
-
"4": {
|
| 39 |
-
"content": "[/INST]",
|
| 40 |
-
"lstrip": false,
|
| 41 |
-
"normalized": true,
|
| 42 |
-
"rstrip": false,
|
| 43 |
-
"single_word": false,
|
| 44 |
-
"special": false
|
| 45 |
-
},
|
| 46 |
-
"10": {
|
| 47 |
-
"content": "[IMG]",
|
| 48 |
-
"lstrip": false,
|
| 49 |
-
"normalized": true,
|
| 50 |
-
"rstrip": false,
|
| 51 |
-
"single_word": false,
|
| 52 |
-
"special": false
|
| 53 |
-
},
|
| 54 |
-
"11": {
|
| 55 |
-
"content": "[PREFIX]",
|
| 56 |
-
"lstrip": false,
|
| 57 |
-
"normalized": true,
|
| 58 |
-
"rstrip": false,
|
| 59 |
-
"single_word": false,
|
| 60 |
-
"special": false
|
| 61 |
-
},
|
| 62 |
-
"12": {
|
| 63 |
-
"content": "[MIDDLE]",
|
| 64 |
-
"lstrip": false,
|
| 65 |
-
"normalized": true,
|
| 66 |
-
"rstrip": false,
|
| 67 |
-
"single_word": false,
|
| 68 |
-
"special": false
|
| 69 |
-
},
|
| 70 |
-
"13": {
|
| 71 |
-
"content": "[SUFFIX]",
|
| 72 |
-
"lstrip": false,
|
| 73 |
-
"normalized": true,
|
| 74 |
-
"rstrip": false,
|
| 75 |
-
"single_word": false,
|
| 76 |
-
"special": false
|
| 77 |
-
}
|
| 78 |
-
},
|
| 79 |
-
"bos_token": "<s>",
|
| 80 |
-
"clean_up_tokenization_spaces": false,
|
| 81 |
-
"eos_token": "</s>",
|
| 82 |
-
"legacy": true,
|
| 83 |
-
"model_max_length": 1000000000000000019884624838656,
|
| 84 |
-
"pad_token": null,
|
| 85 |
-
"sp_model_kwargs": {},
|
| 86 |
-
"spaces_between_special_tokens": false,
|
| 87 |
-
"tokenizer_class": "LlamaTokenizer",
|
| 88 |
-
"unk_token": "<unk>",
|
| 89 |
-
"use_default_system_prompt": false
|
| 90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|