Instructions to use unalignment/weeeeee.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unalignment/weeeeee.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unalignment/weeeeee.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unalignment/weeeeee.0") model = AutoModelForCausalLM.from_pretrained("unalignment/weeeeee.0") 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 unalignment/weeeeee.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unalignment/weeeeee.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unalignment/weeeeee.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unalignment/weeeeee.0
- SGLang
How to use unalignment/weeeeee.0 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 "unalignment/weeeeee.0" \ --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": "unalignment/weeeeee.0", "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 "unalignment/weeeeee.0" \ --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": "unalignment/weeeeee.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use unalignment/weeeeee.0 with Docker Model Runner:
docker model run hf.co/unalignment/weeeeee.0
Upload LlamaForCausalLM
Browse files- config.json +3 -2
- generation_config.json +1 -2
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +2 -2
- model.safetensors.index.json +1 -10
config.json
CHANGED
|
@@ -14,15 +14,16 @@
|
|
| 14 |
"max_position_embeddings": 32768,
|
| 15 |
"model_type": "llama",
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
-
"num_hidden_layers":
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
|
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.37.2",
|
| 26 |
-
"use_cache":
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
|
|
|
| 14 |
"max_position_embeddings": 32768,
|
| 15 |
"model_type": "llama",
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
| 23 |
+
"sliding_window": 4096,
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.37.2",
|
| 27 |
+
"use_cache": true,
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
generation_config.json
CHANGED
|
@@ -2,6 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
-
"transformers_version": "4.37.2"
|
| 6 |
-
"use_cache": false
|
| 7 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 1,
|
| 4 |
"eos_token_id": 2,
|
| 5 |
+
"transformers_version": "4.37.2"
|
|
|
|
| 6 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4943162336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e2da0ebde768bac242f7cbf832e1a248519d1c1d26a1d7355465b1648c39757
|
| 3 |
size 4943162336
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999819336
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a591cb9adbcfac23f8a7e3832ed7afdce769e6f45607f7c69232b92aa70e8ab9
|
| 3 |
size 4999819336
|
model-00003-of-00003.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:f9b905956328ae22115e71e19f8d84e182d46a20f280321d19ee56d4ed540831
|
| 3 |
+
size 4540516344
|
model.safetensors.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|
|
@@ -239,15 +239,6 @@
|
|
| 239 |
"model.layers.31.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 240 |
"model.layers.31.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 241 |
"model.layers.31.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 242 |
-
"model.layers.32.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 243 |
-
"model.layers.32.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 244 |
-
"model.layers.32.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 245 |
-
"model.layers.32.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 246 |
-
"model.layers.32.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 247 |
-
"model.layers.32.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 248 |
-
"model.layers.32.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 249 |
-
"model.layers.32.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 250 |
-
"model.layers.32.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 251 |
"model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 252 |
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 253 |
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 14483464192
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.weight": "model-00003-of-00003.safetensors",
|
|
|
|
| 239 |
"model.layers.31.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 240 |
"model.layers.31.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 241 |
"model.layers.31.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
"model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 243 |
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 244 |
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|