Instructions to use lilmeaty/testing_semifinal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lilmeaty/testing_semifinal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lilmeaty/testing_semifinal") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lilmeaty/testing_semifinal") model = AutoModelForCausalLM.from_pretrained("lilmeaty/testing_semifinal") 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 lilmeaty/testing_semifinal with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lilmeaty/testing_semifinal" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lilmeaty/testing_semifinal", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lilmeaty/testing_semifinal
- SGLang
How to use lilmeaty/testing_semifinal 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 "lilmeaty/testing_semifinal" \ --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": "lilmeaty/testing_semifinal", "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 "lilmeaty/testing_semifinal" \ --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": "lilmeaty/testing_semifinal", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lilmeaty/testing_semifinal with Docker Model Runner:
docker model run hf.co/lilmeaty/testing_semifinal
Update config.json
Browse files- config.json +32 -23
config.json
CHANGED
|
@@ -1,29 +1,20 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "huihui-ai/Llama-3.2-3B-Instruct-abliterated",
|
| 3 |
-
"
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
-
"eos_token_id": [
|
| 10 |
-
|
| 11 |
-
128008,
|
| 12 |
-
128009
|
| 13 |
-
],
|
| 14 |
-
"head_dim": 128,
|
| 15 |
-
"hidden_act": "silu",
|
| 16 |
"hidden_size": 3072,
|
| 17 |
-
"initializer_range": 0.02,
|
| 18 |
"intermediate_size": 8192,
|
| 19 |
-
"max_position_embeddings": 131072,
|
| 20 |
-
"mlp_bias": false,
|
| 21 |
-
"model_type": "llama",
|
| 22 |
-
"num_attention_heads": 24,
|
| 23 |
"num_hidden_layers": 28,
|
|
|
|
| 24 |
"num_key_value_heads": 8,
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
"rope_scaling": {
|
| 28 |
"factor": 32.0,
|
| 29 |
"high_freq_factor": 4.0,
|
|
@@ -32,9 +23,27 @@
|
|
| 32 |
"rope_type": "llama3"
|
| 33 |
},
|
| 34 |
"rope_theta": 500000.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
"tie_word_embeddings": true,
|
| 36 |
-
"torch_dtype": "float16",
|
| 37 |
-
"transformers_version": "4.46.3",
|
| 38 |
"use_cache": true,
|
| 39 |
-
"
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "huihui-ai/Llama-3.2-3B-Instruct-abliterated",
|
| 3 |
+
"model_type": "llama",
|
| 4 |
+
"torch_dtype": "float16",
|
| 5 |
+
"transformers_version": "4.46.3",
|
| 6 |
+
"architectures": ["PartiallySharedLayerModel"],
|
| 7 |
+
"vocab_size": 128256,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": [128001, 128008, 128009],
|
| 10 |
+
"pad_token_id": 128009,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"hidden_size": 3072,
|
|
|
|
| 12 |
"intermediate_size": 8192,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"num_hidden_layers": 28,
|
| 14 |
+
"num_attention_heads": 24,
|
| 15 |
"num_key_value_heads": 8,
|
| 16 |
+
"head_dim": 128,
|
| 17 |
+
"max_position_embeddings": 131072,
|
| 18 |
"rope_scaling": {
|
| 19 |
"factor": 32.0,
|
| 20 |
"high_freq_factor": 4.0,
|
|
|
|
| 23 |
"rope_type": "llama3"
|
| 24 |
},
|
| 25 |
"rope_theta": 500000.0,
|
| 26 |
+
"hidden_act": "silu",
|
| 27 |
+
"initializer_range": 0.02,
|
| 28 |
+
"rms_norm_eps": 1e-05,
|
| 29 |
+
"layer_norm_eps": 1e-05,
|
| 30 |
+
"attention_bias": false,
|
| 31 |
+
"mlp_bias": false,
|
| 32 |
+
"pretraining_tp": 1,
|
| 33 |
"tie_word_embeddings": true,
|
|
|
|
|
|
|
| 34 |
"use_cache": true,
|
| 35 |
+
"shared_input_output_embedding": true,
|
| 36 |
+
"attention_dropout": 0.0,
|
| 37 |
+
"hidden_dropout_prob": 0.1,
|
| 38 |
+
"attn_dropout_prob": 0.1,
|
| 39 |
+
"residual_dropout_prob": 0.0,
|
| 40 |
+
"ffn_dropout_prob": 0.1,
|
| 41 |
+
"output_projection": true,
|
| 42 |
+
"position_embedding_type": "rotary",
|
| 43 |
+
"use_rope": true,
|
| 44 |
+
"gradient_checkpointing": false,
|
| 45 |
+
"multi_query_attention": false,
|
| 46 |
+
"output_attentions": false,
|
| 47 |
+
"output_hidden_states": false,
|
| 48 |
+
"layerdrop": 0.0
|
| 49 |
+
}
|