Instructions to use EssentialAI/rnj-1.5-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EssentialAI/rnj-1.5-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EssentialAI/rnj-1.5-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EssentialAI/rnj-1.5-instruct") model = AutoModelForCausalLM.from_pretrained("EssentialAI/rnj-1.5-instruct") 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 EssentialAI/rnj-1.5-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EssentialAI/rnj-1.5-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EssentialAI/rnj-1.5-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/EssentialAI/rnj-1.5-instruct
- SGLang
How to use EssentialAI/rnj-1.5-instruct 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 "EssentialAI/rnj-1.5-instruct" \ --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": "EssentialAI/rnj-1.5-instruct", "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 "EssentialAI/rnj-1.5-instruct" \ --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": "EssentialAI/rnj-1.5-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use EssentialAI/rnj-1.5-instruct with Docker Model Runner:
docker model run hf.co/EssentialAI/rnj-1.5-instruct
Philip Monk commited on
Commit ·
b3675a3
1
Parent(s): 8126718
remove unused configs
Browse files- config.json +1 -5
config.json
CHANGED
|
@@ -52,18 +52,14 @@
|
|
| 52 |
"max_position_embeddings": 163840,
|
| 53 |
"model_type": "gemma3_text",
|
| 54 |
"num_attention_heads": 32,
|
| 55 |
-
"num_attention_heads_global": 0,
|
| 56 |
"num_hidden_layers": 32,
|
| 57 |
"num_key_value_heads": 8,
|
| 58 |
-
"num_key_value_heads_global": 0,
|
| 59 |
"pad_token_id": 0,
|
| 60 |
"query_pre_attn_scalar": 128,
|
| 61 |
"rms_norm_eps": 1e-06,
|
| 62 |
"rope_theta": 10000,
|
| 63 |
"sliding_window": 8192,
|
| 64 |
-
"sliding_window_pattern": 6,
|
| 65 |
"torch_dtype": "float32",
|
| 66 |
-
"transformers_version": "4.51.2",
|
| 67 |
"use_cache": true,
|
| 68 |
"vocab_size": 128256,
|
| 69 |
"rope_parameters": {
|
|
@@ -86,4 +82,4 @@
|
|
| 86 |
"beta_slow": 1.0
|
| 87 |
}
|
| 88 |
}
|
| 89 |
-
}
|
|
|
|
| 52 |
"max_position_embeddings": 163840,
|
| 53 |
"model_type": "gemma3_text",
|
| 54 |
"num_attention_heads": 32,
|
|
|
|
| 55 |
"num_hidden_layers": 32,
|
| 56 |
"num_key_value_heads": 8,
|
|
|
|
| 57 |
"pad_token_id": 0,
|
| 58 |
"query_pre_attn_scalar": 128,
|
| 59 |
"rms_norm_eps": 1e-06,
|
| 60 |
"rope_theta": 10000,
|
| 61 |
"sliding_window": 8192,
|
|
|
|
| 62 |
"torch_dtype": "float32",
|
|
|
|
| 63 |
"use_cache": true,
|
| 64 |
"vocab_size": 128256,
|
| 65 |
"rope_parameters": {
|
|
|
|
| 82 |
"beta_slow": 1.0
|
| 83 |
}
|
| 84 |
}
|
| 85 |
+
}
|