Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
cybersecurity
cyber-safety
defensive-security
malware-analysis
incident-response
lora-merged
conversational
Instructions to use OpenModel-Labs/CSM-1-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenModel-Labs/CSM-1-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenModel-Labs/CSM-1-Preview") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OpenModel-Labs/CSM-1-Preview") model = AutoModelForMultimodalLM.from_pretrained("OpenModel-Labs/CSM-1-Preview", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenModel-Labs/CSM-1-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenModel-Labs/CSM-1-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenModel-Labs/CSM-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/OpenModel-Labs/CSM-1-Preview
- SGLang
How to use OpenModel-Labs/CSM-1-Preview 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 "OpenModel-Labs/CSM-1-Preview" \ --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": "OpenModel-Labs/CSM-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "OpenModel-Labs/CSM-1-Preview" \ --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": "OpenModel-Labs/CSM-1-Preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use OpenModel-Labs/CSM-1-Preview with Docker Model Runner:
docker model run hf.co/OpenModel-Labs/CSM-1-Preview
Create LICENSE
Browse files
LICENSE
CHANGED
|
@@ -1,202 +1,108 @@
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
-
distribution, then any Derivative Works that You distribute must
|
| 109 |
-
include a readable copy of the attribution notices contained
|
| 110 |
-
within such NOTICE file, excluding those notices that do not
|
| 111 |
-
pertain to any part of the Derivative Works, in at least one
|
| 112 |
-
of the following places: within a NOTICE text file distributed
|
| 113 |
-
as part of the Derivative Works; within the Source form or
|
| 114 |
-
documentation, if provided along with the Derivative Works; or,
|
| 115 |
-
within a display generated by the Derivative Works, if and
|
| 116 |
-
wherever such third-party notices normally appear. The contents
|
| 117 |
-
of the NOTICE file are for informational purposes only and
|
| 118 |
-
do not modify the License. You may add Your own attribution
|
| 119 |
-
notices within Derivative Works that You distribute, alongside
|
| 120 |
-
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
-
that such additional attribution notices cannot be construed
|
| 122 |
-
as modifying the License.
|
| 123 |
-
|
| 124 |
-
You may add Your own copyright statement to Your modifications and
|
| 125 |
-
may provide additional or different license terms and conditions
|
| 126 |
-
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
-
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
-
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
-
the conditions stated in this License.
|
| 130 |
-
|
| 131 |
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
-
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
-
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
-
this License, without any additional terms or conditions.
|
| 135 |
-
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
-
the terms of any separate license agreement you may have executed
|
| 137 |
-
with Licensor regarding such Contributions.
|
| 138 |
-
|
| 139 |
-
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
-
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
-
except as required for reasonable and customary use in describing the
|
| 142 |
-
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
-
|
| 144 |
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
-
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
-
implied, including, without limitation, any warranties or conditions
|
| 149 |
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
-
appropriateness of using or redistributing the Work and assume any
|
| 152 |
-
risks associated with Your exercise of permissions under this License.
|
| 153 |
-
|
| 154 |
-
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
-
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
-
unless required by applicable law (such as deliberate and grossly
|
| 157 |
-
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
-
liable to You for damages, including any direct, indirect, special,
|
| 159 |
-
incidental, or consequential damages of any character arising as a
|
| 160 |
-
result of this License or out of the use or inability to use the
|
| 161 |
-
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
-
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
-
other commercial damages or losses), even if such Contributor
|
| 164 |
-
has been advised of the possibility of such damages.
|
| 165 |
-
|
| 166 |
-
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
-
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
-
or other liability obligations and/or rights consistent with this
|
| 170 |
-
License. However, in accepting such obligations, You may act only
|
| 171 |
-
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
-
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
-
defend, and hold each Contributor harmless for any liability
|
| 174 |
-
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
-
of your accepting any such warranty or additional liability.
|
| 176 |
-
|
| 177 |
-
END OF TERMS AND CONDITIONS
|
| 178 |
-
|
| 179 |
-
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
-
|
| 181 |
-
To apply the Apache License to your work, attach the following
|
| 182 |
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
-
replaced with your own identifying information. (Don't include
|
| 184 |
-
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
-
comment syntax for the file format. We also recommend that a
|
| 186 |
-
file or class name and description of purpose be included on the
|
| 187 |
-
same "printed page" as the copyright notice for easier
|
| 188 |
-
identification within third-party archives.
|
| 189 |
-
|
| 190 |
-
Copyright 2026 Alibaba Cloud
|
| 191 |
-
|
| 192 |
-
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
-
you may not use this file except in compliance with the License.
|
| 194 |
-
You may obtain a copy of the License at
|
| 195 |
-
|
| 196 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
-
|
| 198 |
-
Unless required by applicable law or agreed to in writing, software
|
| 199 |
-
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
-
See the License for the specific language governing permissions and
|
| 202 |
-
limitations under the License.
|
|
|
|
| 1 |
+
CSM FAIR USE AGREEMENT
|
| 2 |
+
Version 1.0
|
| 3 |
|
| 4 |
+
Copyright (c) 2026 OpenModels-ML. All rights reserved except as granted below.
|
| 5 |
+
|
| 6 |
+
This Agreement applies to "CSM-1-Preview" (the "Cyber Safety Model" or "CSM"), including its weights,
|
| 7 |
+
configuration, tokenizer and the other files in this repository (together, the "Model"). By downloading,
|
| 8 |
+
using, copying or redistributing the Model you accept this Agreement.
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
1. DEFINITIONS
|
| 12 |
+
|
| 13 |
+
"Derivative" means any fine-tune, merge, adapter, quantization, distillation or other modification of
|
| 14 |
+
the Model.
|
| 15 |
+
|
| 16 |
+
"Uncensored Version" means a Derivative whose safety behaviour (refusals, safeguards, content filtering)
|
| 17 |
+
has been reduced, bypassed or removed, by training, surrounding infrastructure or any other means.
|
| 18 |
+
|
| 19 |
+
"Prohibited Use" has the meaning given in Section 3.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
2. GRANT
|
| 23 |
+
|
| 24 |
+
Subject to this Agreement, you receive a non-exclusive, worldwide, royalty-free, revocable licence to
|
| 25 |
+
use, copy, modify, create Derivatives of, and redistribute the Model, including for commercial purposes.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
3. PROHIBITED USES (NO CYBER ATTACKS)
|
| 29 |
+
|
| 30 |
+
You must not use the Model, or any Derivative, to carry out, assist, plan, automate or enable:
|
| 31 |
+
|
| 32 |
+
a) unauthorized access to, or intrusion into, computers, accounts, networks, devices or data;
|
| 33 |
+
b) creating, improving, obfuscating, packaging or deploying malware, ransomware, stealers, botnets,
|
| 34 |
+
rootkits, or other malicious code intended to cause harm;
|
| 35 |
+
c) exploiting vulnerabilities against systems you do not own and are not explicitly authorized in
|
| 36 |
+
writing to test;
|
| 37 |
+
d) phishing, social engineering, credential theft, fraud, extortion or impersonation;
|
| 38 |
+
e) denial-of-service attacks, sabotage of systems, or attacks on critical infrastructure;
|
| 39 |
+
f) stalking, unlawful surveillance, or collecting personal data without a lawful basis;
|
| 40 |
+
g) evading security controls in order to do any of the above, or helping anyone else do so.
|
| 41 |
+
|
| 42 |
+
NOT prohibited: defensive security, incident response, detection engineering, malware analysis in
|
| 43 |
+
isolated environments, authorized penetration testing and red-teaming with written permission, security
|
| 44 |
+
research conducted lawfully and responsibly, capture-the-flag events, and education.
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
4. UNCENSORED VERSIONS (AT YOUR OWN RISK)
|
| 48 |
+
|
| 49 |
+
a) You may create and share Uncensored Versions, but you do so entirely at your own risk.
|
| 50 |
+
|
| 51 |
+
b) Section 3 applies to every Uncensored Version in full. Removing safeguards does not permit any
|
| 52 |
+
Prohibited Use.
|
| 53 |
+
|
| 54 |
+
c) An Uncensored Version must (i) carry this Agreement, (ii) state clearly that it is modified and that
|
| 55 |
+
its safeguards are reduced or removed, and (iii) not be presented as the official CSM or as endorsed
|
| 56 |
+
by the licensor.
|
| 57 |
+
|
| 58 |
+
d) You alone are responsible for the Uncensored Version, its outputs, and every use made of it by you or
|
| 59 |
+
by people you give it to. The licensor gives no support for Uncensored Versions.
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
5. REDISTRIBUTION
|
| 63 |
+
|
| 64 |
+
When you redistribute the Model or a Derivative you must (i) include this Agreement and the notice of
|
| 65 |
+
the base model license, (ii) mark any changes you made, and (iii) require recipients to accept this
|
| 66 |
+
Agreement.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
6. BASE MODEL
|
| 70 |
+
|
| 71 |
+
The Model is built on Qwen/Qwen3.5-27B, which stays under its own licence (included as LICENSE-BASE
|
| 72 |
+
where available). This Agreement does not change that licence and grants no rights in the base model
|
| 73 |
+
beyond it. If the two conflict, you must comply with both, and where they cannot both be satisfied, the
|
| 74 |
+
stricter term applies.
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
7. NO WARRANTY
|
| 78 |
+
|
| 79 |
+
THE MODEL IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ACCURACY,
|
| 80 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. Outputs may be wrong, incomplete or unsafe. Verify
|
| 81 |
+
them before relying on them. Nothing it produces is legal, forensic or compliance advice, and it is not
|
| 82 |
+
a security control.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
8. LIMITATION OF LIABILITY
|
| 86 |
+
|
| 87 |
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSOR AND CONTRIBUTORS ARE NOT LIABLE FOR ANY CLAIM,
|
| 88 |
+
DAMAGES OR OTHER LIABILITY ARISING FROM THE MODEL, ITS OUTPUTS, ANY DERIVATIVE, OR ANY USE OF THEM,
|
| 89 |
+
INCLUDING MISUSE BY THIRD PARTIES. You agree to indemnify the licensor against claims arising from your
|
| 90 |
+
breach of this Agreement or from Derivatives you create or distribute.
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
9. TERMINATION
|
| 94 |
+
|
| 95 |
+
Your rights end automatically if you breach this Agreement, in particular Section 3. On termination you
|
| 96 |
+
must stop using and distributing the Model and all Derivatives.
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
10. LAW
|
| 100 |
+
|
| 101 |
+
You are responsible for complying with all laws that apply to you, including computer-misuse, export
|
| 102 |
+
and privacy laws.
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
11. GENERAL
|
| 106 |
+
|
| 107 |
+
If any provision is unenforceable, the rest remains in effect. The licensor may publish updated versions
|
| 108 |
+
of this Agreement; copies you already received stay under the version you received them under.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|