Instructions to use Promptengineering/tinyllama-colorist-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Promptengineering/tinyllama-colorist-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Promptengineering/tinyllama-colorist-v0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Promptengineering/tinyllama-colorist-v0") model = AutoModelForCausalLM.from_pretrained("Promptengineering/tinyllama-colorist-v0") 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]:])) - Inference
- Local Apps Settings
- vLLM
How to use Promptengineering/tinyllama-colorist-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Promptengineering/tinyllama-colorist-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Promptengineering/tinyllama-colorist-v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Promptengineering/tinyllama-colorist-v0
- SGLang
How to use Promptengineering/tinyllama-colorist-v0 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 "Promptengineering/tinyllama-colorist-v0" \ --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": "Promptengineering/tinyllama-colorist-v0", "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 "Promptengineering/tinyllama-colorist-v0" \ --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": "Promptengineering/tinyllama-colorist-v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Promptengineering/tinyllama-colorist-v0 with Docker Model Runner:
docker model run hf.co/Promptengineering/tinyllama-colorist-v0
Upload LlamaForCausalLM
Browse files- README.md +3 -1
- config.json +19 -4
- generation_config.json +1 -1
- model.safetensors +2 -2
README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- trl
|
| 5 |
+
- sft
|
| 6 |
---
|
| 7 |
|
| 8 |
# Model Card for Model ID
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -18,12 +18,27 @@
|
|
| 18 |
"num_hidden_layers": 22,
|
| 19 |
"num_key_value_heads": 4,
|
| 20 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"rms_norm_eps": 1e-05,
|
| 22 |
"rope_scaling": null,
|
| 23 |
"rope_theta": 10000.0,
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
-
"torch_dtype": "
|
| 26 |
-
"transformers_version": "4.42.
|
| 27 |
-
"use_cache":
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "Codex07/RD05_1",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 18 |
"num_hidden_layers": 22,
|
| 19 |
"num_key_value_heads": 4,
|
| 20 |
"pretraining_tp": 1,
|
| 21 |
+
"quantization_config": {
|
| 22 |
+
"_load_in_4bit": true,
|
| 23 |
+
"_load_in_8bit": false,
|
| 24 |
+
"bnb_4bit_compute_dtype": "float16",
|
| 25 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 26 |
+
"bnb_4bit_quant_type": "nf4",
|
| 27 |
+
"bnb_4bit_use_double_quant": true,
|
| 28 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 29 |
+
"llm_int8_has_fp16_weight": false,
|
| 30 |
+
"llm_int8_skip_modules": null,
|
| 31 |
+
"llm_int8_threshold": 6.0,
|
| 32 |
+
"load_in_4bit": true,
|
| 33 |
+
"load_in_8bit": false,
|
| 34 |
+
"quant_method": "bitsandbytes"
|
| 35 |
+
},
|
| 36 |
"rms_norm_eps": 1e-05,
|
| 37 |
"rope_scaling": null,
|
| 38 |
"rope_theta": 10000.0,
|
| 39 |
"tie_word_embeddings": false,
|
| 40 |
+
"torch_dtype": "float32",
|
| 41 |
+
"transformers_version": "4.42.4",
|
| 42 |
+
"use_cache": false,
|
| 43 |
"vocab_size": 32000
|
| 44 |
}
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"eos_token_id": 2,
|
| 4 |
"max_length": 2048,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.42.
|
| 7 |
}
|
|
|
|
| 3 |
"eos_token_id": 2,
|
| 4 |
"max_length": 2048,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.42.4"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df7e02c1c26ef92e5e55498bed9fc785cef750c64432344add2d624401866332
|
| 3 |
+
size 1029304351
|