Text Generation
Transformers
TensorBoard
Safetensors
PEFT
llama
text-generation-inference
conversational
Instructions to use retronic/Colox_The1st with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use retronic/Colox_The1st with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="retronic/Colox_The1st") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("retronic/Colox_The1st") model = AutoModelForCausalLM.from_pretrained("retronic/Colox_The1st", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use retronic/Colox_The1st with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use retronic/Colox_The1st with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "retronic/Colox_The1st" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "retronic/Colox_The1st", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/retronic/Colox_The1st
- SGLang
How to use retronic/Colox_The1st 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 "retronic/Colox_The1st" \ --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": "retronic/Colox_The1st", "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 "retronic/Colox_The1st" \ --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": "retronic/Colox_The1st", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use retronic/Colox_The1st with Docker Model Runner:
docker model run hf.co/retronic/Colox_The1st
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,10 +6,10 @@ tags:
|
|
| 6 |
library_name: transformers
|
| 7 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 8 |
widget:
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
license:
|
| 13 |
---
|
| 14 |
|
| 15 |
# What this is?
|
|
@@ -45,4 +45,28 @@ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tok
|
|
| 45 |
|
| 46 |
# Model response: "Hello! How can I assist you today?"
|
| 47 |
print(response)
|
| 48 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
library_name: transformers
|
| 7 |
base_model: meta-llama/Llama-3.1-8B-Instruct
|
| 8 |
widget:
|
| 9 |
+
- messages:
|
| 10 |
+
- role: user
|
| 11 |
+
content: What is your favorite condiment?
|
| 12 |
+
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
# What this is?
|
|
|
|
| 45 |
|
| 46 |
# Model response: "Hello! How can I assist you today?"
|
| 47 |
print(response)
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
MIT License
|
| 53 |
+
|
| 54 |
+
Copyright (c) 2025 Max AI
|
| 55 |
+
|
| 56 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 57 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 58 |
+
in the Software without restriction, including without limitation the rights
|
| 59 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 60 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 61 |
+
furnished to do so, subject to the following conditions:
|
| 62 |
+
|
| 63 |
+
The above copyright notice and this permission notice shall be included in all
|
| 64 |
+
copies or substantial portions of the Software.
|
| 65 |
+
|
| 66 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 67 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 68 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 69 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 70 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 71 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 72 |
+
SOFTWARE.
|