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 +12 -8
config.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"torch_dtype": "float16",
|
| 4 |
-
"eos_token_id": 128009,
|
| 5 |
-
"bos_token_id": 128000,
|
| 6 |
-
"pad_token_id": 128009,
|
| 7 |
-
"vocab_size": 128256,
|
| 8 |
"architectures": [
|
| 9 |
"LlamaForCausalLM"
|
| 10 |
],
|
| 11 |
"attention_bias": false,
|
| 12 |
"attention_dropout": 0.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"head_dim": 128,
|
| 14 |
"hidden_act": "silu",
|
| 15 |
"hidden_size": 3072,
|
|
@@ -17,6 +18,7 @@
|
|
| 17 |
"intermediate_size": 8192,
|
| 18 |
"max_position_embeddings": 131072,
|
| 19 |
"mlp_bias": false,
|
|
|
|
| 20 |
"num_attention_heads": 24,
|
| 21 |
"num_hidden_layers": 28,
|
| 22 |
"num_key_value_heads": 8,
|
|
@@ -31,6 +33,8 @@
|
|
| 31 |
},
|
| 32 |
"rope_theta": 500000.0,
|
| 33 |
"tie_word_embeddings": true,
|
|
|
|
| 34 |
"transformers_version": "4.46.3",
|
| 35 |
-
"use_cache": true
|
| 36 |
-
|
|
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "huihui-ai/Llama-3.2-3B-Instruct-abliterated",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 128000,
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
128001,
|
| 11 |
+
128008,
|
| 12 |
+
128009
|
| 13 |
+
],
|
| 14 |
"head_dim": 128,
|
| 15 |
"hidden_act": "silu",
|
| 16 |
"hidden_size": 3072,
|
|
|
|
| 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,
|
|
|
|
| 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 |
+
"vocab_size": 128256
|
| 40 |
+
}
|