Instructions to use trl-internal-testing/tiny-RemoteForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trl-internal-testing/tiny-RemoteForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trl-internal-testing/tiny-RemoteForCausalLM", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("trl-internal-testing/tiny-RemoteForCausalLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trl-internal-testing/tiny-RemoteForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trl-internal-testing/tiny-RemoteForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trl-internal-testing/tiny-RemoteForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trl-internal-testing/tiny-RemoteForCausalLM
- SGLang
How to use trl-internal-testing/tiny-RemoteForCausalLM 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 "trl-internal-testing/tiny-RemoteForCausalLM" \ --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": "trl-internal-testing/tiny-RemoteForCausalLM", "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 "trl-internal-testing/tiny-RemoteForCausalLM" \ --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": "trl-internal-testing/tiny-RemoteForCausalLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trl-internal-testing/tiny-RemoteForCausalLM with Docker Model Runner:
docker model run hf.co/trl-internal-testing/tiny-RemoteForCausalLM
Upload RemoteForCausalLM
#2
by albertvillanova HF Staff - opened
- config.json +16 -6
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -10,24 +10,34 @@
|
|
| 10 |
"AutoModelForCausalLM": "modeling_remote.RemoteForCausalLM",
|
| 11 |
"AutoModelForSequenceClassification": "modeling_remote.RemoteForSequenceClassification"
|
| 12 |
},
|
| 13 |
-
"bos_token_id":
|
| 14 |
"dtype": "bfloat16",
|
| 15 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
"head_dim": 2,
|
| 17 |
"hidden_act": "silu",
|
| 18 |
"hidden_size": 8,
|
| 19 |
"initializer_range": 0.02,
|
| 20 |
"intermediate_size": 32,
|
| 21 |
-
"max_position_embeddings":
|
| 22 |
"mlp_bias": false,
|
| 23 |
"model_type": "remote",
|
| 24 |
"num_attention_heads": 4,
|
| 25 |
"num_hidden_layers": 2,
|
| 26 |
"num_key_value_heads": 2,
|
| 27 |
"pretraining_tp": 1,
|
| 28 |
-
"rms_norm_eps": 1e-
|
| 29 |
-
"rope_scaling":
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"tie_word_embeddings": false,
|
| 32 |
"transformers_version": "4.56.2",
|
| 33 |
"use_cache": true,
|
|
|
|
| 10 |
"AutoModelForCausalLM": "modeling_remote.RemoteForCausalLM",
|
| 11 |
"AutoModelForSequenceClassification": "modeling_remote.RemoteForSequenceClassification"
|
| 12 |
},
|
| 13 |
+
"bos_token_id": 128000,
|
| 14 |
"dtype": "bfloat16",
|
| 15 |
+
"eos_token_id": [
|
| 16 |
+
128001,
|
| 17 |
+
128008,
|
| 18 |
+
128009
|
| 19 |
+
],
|
| 20 |
"head_dim": 2,
|
| 21 |
"hidden_act": "silu",
|
| 22 |
"hidden_size": 8,
|
| 23 |
"initializer_range": 0.02,
|
| 24 |
"intermediate_size": 32,
|
| 25 |
+
"max_position_embeddings": 131072,
|
| 26 |
"mlp_bias": false,
|
| 27 |
"model_type": "remote",
|
| 28 |
"num_attention_heads": 4,
|
| 29 |
"num_hidden_layers": 2,
|
| 30 |
"num_key_value_heads": 2,
|
| 31 |
"pretraining_tp": 1,
|
| 32 |
+
"rms_norm_eps": 1e-05,
|
| 33 |
+
"rope_scaling": {
|
| 34 |
+
"factor": 32.0,
|
| 35 |
+
"high_freq_factor": 4.0,
|
| 36 |
+
"low_freq_factor": 1.0,
|
| 37 |
+
"original_max_position_embeddings": 8192,
|
| 38 |
+
"rope_type": "llama3"
|
| 39 |
+
},
|
| 40 |
+
"rope_theta": 500000.0,
|
| 41 |
"tie_word_embeddings": false,
|
| 42 |
"transformers_version": "4.56.2",
|
| 43 |
"use_cache": true,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4110296
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9137fba9400b4f6f632014c7efd5887c1ff0f65a675a87f1d280c4cb6e69f45
|
| 3 |
size 4110296
|