Instructions to use VERSIL91/pretrain_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VERSIL91/pretrain_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VERSIL91/pretrain_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("VERSIL91/pretrain_model") model = AutoModelForCausalLM.from_pretrained("VERSIL91/pretrain_model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use VERSIL91/pretrain_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VERSIL91/pretrain_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VERSIL91/pretrain_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/VERSIL91/pretrain_model
- SGLang
How to use VERSIL91/pretrain_model 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 "VERSIL91/pretrain_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VERSIL91/pretrain_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "VERSIL91/pretrain_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VERSIL91/pretrain_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use VERSIL91/pretrain_model with Docker Model Runner:
docker model run hf.co/VERSIL91/pretrain_model
Upload MistralForCausalLM
Browse files- config.json +16 -37
- generation_config.json +1 -4
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -1,46 +1,25 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/root/.ml/pretraining/local-models/training/2024-02-
|
| 3 |
-
"activation_dropout": 0.0,
|
| 4 |
-
"activation_function": "gelu",
|
| 5 |
"architectures": [
|
| 6 |
-
"
|
| 7 |
],
|
| 8 |
-
"
|
| 9 |
-
"bos_token_id": 0,
|
| 10 |
-
"classifier_dropout": 0.0,
|
| 11 |
-
"d_model": 768,
|
| 12 |
-
"decoder_attention_heads": 12,
|
| 13 |
-
"decoder_ffn_dim": 3072,
|
| 14 |
-
"decoder_layerdrop": 0.0,
|
| 15 |
-
"decoder_layers": 15,
|
| 16 |
-
"decoder_start_token_id": 2,
|
| 17 |
-
"dropout": 0.1,
|
| 18 |
-
"encoder_attention_heads": 12,
|
| 19 |
-
"encoder_ffn_dim": 3072,
|
| 20 |
-
"encoder_layerdrop": 0.0,
|
| 21 |
-
"encoder_layers": 15,
|
| 22 |
"eos_token_id": 2,
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
"2": "LABEL_2"
|
| 28 |
-
},
|
| 29 |
-
"init_std": 0.02,
|
| 30 |
-
"is_decoder": true,
|
| 31 |
-
"is_encoder_decoder": false,
|
| 32 |
-
"label2id": {
|
| 33 |
-
"LABEL_0": 0,
|
| 34 |
-
"LABEL_1": 1,
|
| 35 |
-
"LABEL_2": 2
|
| 36 |
-
},
|
| 37 |
"max_position_embeddings": 1024,
|
| 38 |
-
"model_type": "
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
"torch_dtype": "float32",
|
| 43 |
"transformers_version": "4.34.1",
|
| 44 |
"use_cache": true,
|
| 45 |
-
"vocab_size":
|
| 46 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/root/.ml/pretraining/local-models/training/2024-02-05_20-34-01/",
|
|
|
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
+
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
+
"bos_token_id": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"eos_token_id": 2,
|
| 8 |
+
"hidden_act": "silu",
|
| 9 |
+
"hidden_size": 864,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 2382,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
"max_position_embeddings": 1024,
|
| 13 |
+
"model_type": "mistral",
|
| 14 |
+
"num_attention_heads": 12,
|
| 15 |
+
"num_hidden_layers": 18,
|
| 16 |
+
"num_key_value_heads": 2,
|
| 17 |
+
"rms_norm_eps": 1e-06,
|
| 18 |
+
"rope_theta": 10000.0,
|
| 19 |
+
"sliding_window": 4096,
|
| 20 |
+
"tie_word_embeddings": true,
|
| 21 |
"torch_dtype": "float32",
|
| 22 |
"transformers_version": "4.34.1",
|
| 23 |
"use_cache": true,
|
| 24 |
+
"vocab_size": 50257
|
| 25 |
}
|
generation_config.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
-
"bos_token_id":
|
| 4 |
-
"decoder_start_token_id": 2,
|
| 5 |
"eos_token_id": 2,
|
| 6 |
-
"forced_eos_token_id": 2,
|
| 7 |
-
"pad_token_id": 1,
|
| 8 |
"transformers_version": "4.34.1"
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
|
|
|
| 4 |
"eos_token_id": 2,
|
|
|
|
|
|
|
| 5 |
"transformers_version": "4.34.1"
|
| 6 |
}
|
model.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:877f1a01e9bb058f85ff5c67c6e86ca8e25c2b8f35d1077cd0f0dcb6151305f0
|
| 3 |
+
size 743784040
|