Instructions to use hf-internal-testing/tiny-random-RemBertForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-RemBertForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hf-internal-testing/tiny-random-RemBertForCausalLM")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-RemBertForCausalLM") model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-RemBertForCausalLM") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hf-internal-testing/tiny-random-RemBertForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hf-internal-testing/tiny-random-RemBertForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hf-internal-testing/tiny-random-RemBertForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hf-internal-testing/tiny-random-RemBertForCausalLM
- SGLang
How to use hf-internal-testing/tiny-random-RemBertForCausalLM 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 "hf-internal-testing/tiny-random-RemBertForCausalLM" \ --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": "hf-internal-testing/tiny-random-RemBertForCausalLM", "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 "hf-internal-testing/tiny-random-RemBertForCausalLM" \ --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": "hf-internal-testing/tiny-random-RemBertForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hf-internal-testing/tiny-random-RemBertForCausalLM with Docker Model Runner:
docker model run hf.co/hf-internal-testing/tiny-random-RemBertForCausalLM
Upload tiny models for RemBertForCausalLM
Browse files- config.json +30 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +15 -0
- tf_model.h5 +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +23 -0
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "temp/dummy/rembert/RemBertForCausalLM",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RemBertForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 2,
|
| 8 |
+
"classifier_dropout_prob": 0.1,
|
| 9 |
+
"eos_token_id": 3,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 32,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"input_embedding_size": 18,
|
| 15 |
+
"intermediate_size": 37,
|
| 16 |
+
"is_decoder": true,
|
| 17 |
+
"layer_norm_eps": 1e-12,
|
| 18 |
+
"max_position_embeddings": 512,
|
| 19 |
+
"model_type": "rembert",
|
| 20 |
+
"num_attention_heads": 4,
|
| 21 |
+
"num_hidden_layers": 5,
|
| 22 |
+
"output_embedding_size": 43,
|
| 23 |
+
"pad_token_id": 0,
|
| 24 |
+
"tie_word_embeddings": false,
|
| 25 |
+
"torch_dtype": "float32",
|
| 26 |
+
"transformers_version": "4.25.0.dev0",
|
| 27 |
+
"type_vocab_size": 16,
|
| 28 |
+
"use_cache": true,
|
| 29 |
+
"vocab_size": 1024
|
| 30 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c2eee41cc22503fcdef79d0b2e1bc49e152642cecb22b474b653d10ff224e85
|
| 3 |
+
size 470539
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "[CLS]",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"eos_token": "[SEP]",
|
| 5 |
+
"mask_token": {
|
| 6 |
+
"content": "[MASK]",
|
| 7 |
+
"lstrip": true,
|
| 8 |
+
"normalized": true,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"pad_token": "[PAD]",
|
| 13 |
+
"sep_token": "[SEP]",
|
| 14 |
+
"unk_token": "[UNK]"
|
| 15 |
+
}
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6cc120638c8e1d626bdbf1123c1cffb2956565153f7953e34196116e012f084f
|
| 3 |
+
size 570000
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "[CLS]",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": false,
|
| 5 |
+
"eos_token": "[SEP]",
|
| 6 |
+
"keep_accents": true,
|
| 7 |
+
"mask_token": {
|
| 8 |
+
"__type": "AddedToken",
|
| 9 |
+
"content": "[MASK]",
|
| 10 |
+
"lstrip": true,
|
| 11 |
+
"normalized": true,
|
| 12 |
+
"rstrip": false,
|
| 13 |
+
"single_word": false
|
| 14 |
+
},
|
| 15 |
+
"model_max_length": 512,
|
| 16 |
+
"name_or_path": "google/rembert",
|
| 17 |
+
"pad_token": "[PAD]",
|
| 18 |
+
"remove_space": true,
|
| 19 |
+
"sep_token": "[SEP]",
|
| 20 |
+
"special_tokens_map_file": "/home/huggingface/.cache/huggingface/hub/models--google--rembert/snapshots/65da5133da36e29dfca67d4f0dd9f7f9db21b563/special_tokens_map.json",
|
| 21 |
+
"tokenizer_class": "RemBertTokenizer",
|
| 22 |
+
"unk_token": "[UNK]"
|
| 23 |
+
}
|