Instructions to use Ochiroo/tiny_mn_gpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ochiroo/tiny_mn_gpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ochiroo/tiny_mn_gpt")# Load model directly from transformers import AutoTokenizer, TF_AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ochiroo/tiny_mn_gpt") model = TF_AutoModelForCausalLM.from_pretrained("Ochiroo/tiny_mn_gpt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ochiroo/tiny_mn_gpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ochiroo/tiny_mn_gpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ochiroo/tiny_mn_gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ochiroo/tiny_mn_gpt
- SGLang
How to use Ochiroo/tiny_mn_gpt 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 "Ochiroo/tiny_mn_gpt" \ --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": "Ochiroo/tiny_mn_gpt", "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 "Ochiroo/tiny_mn_gpt" \ --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": "Ochiroo/tiny_mn_gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ochiroo/tiny_mn_gpt with Docker Model Runner:
docker model run hf.co/Ochiroo/tiny_mn_gpt
update
Browse files- config.json +24 -0
- merges.txt +0 -0
- special_tokens_map.json +1 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu_new",
|
| 3 |
+
"attn_pdrop": 0.1,
|
| 4 |
+
"bos_token_id": 0,
|
| 5 |
+
"embd_pdrop": 0.1,
|
| 6 |
+
"eos_token_id": 2,
|
| 7 |
+
"gradient_checkpointing": false,
|
| 8 |
+
"initializer_range": 0.02,
|
| 9 |
+
"layer_norm_epsilon": 1e-05,
|
| 10 |
+
"model_type": "gpt2",
|
| 11 |
+
"n_ctx": 1024,
|
| 12 |
+
"n_embd": 768,
|
| 13 |
+
"n_head": 12,
|
| 14 |
+
"n_inner": null,
|
| 15 |
+
"n_layer": 12,
|
| 16 |
+
"n_positions": 1024,
|
| 17 |
+
"resid_pdrop": 0.1,
|
| 18 |
+
"summary_activation": null,
|
| 19 |
+
"summary_first_dropout": 0.1,
|
| 20 |
+
"summary_proj_to_labels": true,
|
| 21 |
+
"summary_type": "cls_index",
|
| 22 |
+
"summary_use_proj": true,
|
| 23 |
+
"vocab_size": 50000
|
| 24 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": "<mask>"}
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b7b1a25cd7b2f720a2b030a2a2a2dcc136b481b768b6be60a40e273c8565405
|
| 3 |
+
size 497144144
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "tokenized_data"}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|