Text Generation
Transformers
Safetensors
llama
Generated from Trainer
sft
trl
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use andy211313/colorist-gpu-sample with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andy211313/colorist-gpu-sample with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="andy211313/colorist-gpu-sample") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("andy211313/colorist-gpu-sample") model = AutoModelForCausalLM.from_pretrained("andy211313/colorist-gpu-sample") 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
- vLLM
How to use andy211313/colorist-gpu-sample with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "andy211313/colorist-gpu-sample" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "andy211313/colorist-gpu-sample", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/andy211313/colorist-gpu-sample
- SGLang
How to use andy211313/colorist-gpu-sample 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 "andy211313/colorist-gpu-sample" \ --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": "andy211313/colorist-gpu-sample", "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 "andy211313/colorist-gpu-sample" \ --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": "andy211313/colorist-gpu-sample", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use andy211313/colorist-gpu-sample with Docker Model Runner:
docker model run hf.co/andy211313/colorist-gpu-sample
Upload LlamaForCausalLM
Browse files- config.json +20 -10
- generation_config.json +9 -4
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -4,19 +4,23 @@
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
-
"bos_token_id":
|
| 8 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"head_dim": 64,
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 2048,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
-
"intermediate_size":
|
| 14 |
-
"max_position_embeddings":
|
| 15 |
"mlp_bias": false,
|
| 16 |
"model_type": "llama",
|
| 17 |
"num_attention_heads": 32,
|
| 18 |
-
"num_hidden_layers":
|
| 19 |
-
"num_key_value_heads":
|
| 20 |
"pretraining_tp": 1,
|
| 21 |
"quantization_config": {
|
| 22 |
"_load_in_4bit": true,
|
|
@@ -34,11 +38,17 @@
|
|
| 34 |
"quant_method": "bitsandbytes"
|
| 35 |
},
|
| 36 |
"rms_norm_eps": 1e-05,
|
| 37 |
-
"rope_scaling":
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
"torch_dtype": "bfloat16",
|
| 41 |
"transformers_version": "4.55.4",
|
| 42 |
"use_cache": false,
|
| 43 |
-
"vocab_size":
|
| 44 |
}
|
|
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 128000,
|
| 8 |
+
"eos_token_id": [
|
| 9 |
+
128001,
|
| 10 |
+
128008,
|
| 11 |
+
128009
|
| 12 |
+
],
|
| 13 |
"head_dim": 64,
|
| 14 |
"hidden_act": "silu",
|
| 15 |
"hidden_size": 2048,
|
| 16 |
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 8192,
|
| 18 |
+
"max_position_embeddings": 131072,
|
| 19 |
"mlp_bias": false,
|
| 20 |
"model_type": "llama",
|
| 21 |
"num_attention_heads": 32,
|
| 22 |
+
"num_hidden_layers": 16,
|
| 23 |
+
"num_key_value_heads": 8,
|
| 24 |
"pretraining_tp": 1,
|
| 25 |
"quantization_config": {
|
| 26 |
"_load_in_4bit": true,
|
|
|
|
| 38 |
"quant_method": "bitsandbytes"
|
| 39 |
},
|
| 40 |
"rms_norm_eps": 1e-05,
|
| 41 |
+
"rope_scaling": {
|
| 42 |
+
"factor": 32.0,
|
| 43 |
+
"high_freq_factor": 4.0,
|
| 44 |
+
"low_freq_factor": 1.0,
|
| 45 |
+
"original_max_position_embeddings": 8192,
|
| 46 |
+
"rope_type": "llama3"
|
| 47 |
+
},
|
| 48 |
+
"rope_theta": 500000.0,
|
| 49 |
+
"tie_word_embeddings": true,
|
| 50 |
"torch_dtype": "bfloat16",
|
| 51 |
"transformers_version": "4.55.4",
|
| 52 |
"use_cache": false,
|
| 53 |
+
"vocab_size": 128256
|
| 54 |
}
|
generation_config.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"bos_token_id":
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
"transformers_version": "4.55.4"
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"bos_token_id": 128000,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
128001,
|
| 6 |
+
128008,
|
| 7 |
+
128009
|
| 8 |
+
],
|
| 9 |
+
"temperature": 0.6,
|
| 10 |
+
"top_p": 0.9,
|
| 11 |
"transformers_version": "4.55.4"
|
| 12 |
}
|
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:917abdded5a61fccbaae44f2ccb35b04ccc5aa2ebb68748413b6386a4019b4e7
|
| 3 |
+
size 1072936873
|