Instructions to use lambda/pythia-1.4b-deduped-synthetic-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lambda/pythia-1.4b-deduped-synthetic-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lambda/pythia-1.4b-deduped-synthetic-instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lambda/pythia-1.4b-deduped-synthetic-instruct") model = AutoModelForCausalLM.from_pretrained("lambda/pythia-1.4b-deduped-synthetic-instruct") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lambda/pythia-1.4b-deduped-synthetic-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lambda/pythia-1.4b-deduped-synthetic-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lambda/pythia-1.4b-deduped-synthetic-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lambda/pythia-1.4b-deduped-synthetic-instruct
- SGLang
How to use lambda/pythia-1.4b-deduped-synthetic-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 "lambda/pythia-1.4b-deduped-synthetic-instruct" \ --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": "lambda/pythia-1.4b-deduped-synthetic-instruct", "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 "lambda/pythia-1.4b-deduped-synthetic-instruct" \ --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": "lambda/pythia-1.4b-deduped-synthetic-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lambda/pythia-1.4b-deduped-synthetic-instruct with Docker Model Runner:
docker model run hf.co/lambda/pythia-1.4b-deduped-synthetic-instruct
Commit ·
eaaea8f
1
Parent(s): 24d8fbe
Upload GPTNeoXForCausalLM
Browse files- config.json +5 -5
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/home/ubuntu/llm/outputs/ft-synthetic-instruct-gptj-pairwise-
|
| 3 |
"architectures": [
|
| 4 |
"GPTNeoXForCausalLM"
|
| 5 |
],
|
| 6 |
"bos_token_id": 0,
|
| 7 |
"eos_token_id": 0,
|
| 8 |
"hidden_act": "gelu",
|
| 9 |
-
"hidden_size":
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
-
"intermediate_size":
|
| 12 |
"layer_norm_eps": 1e-05,
|
| 13 |
"max_position_embeddings": 2048,
|
| 14 |
"model_type": "gpt_neox",
|
| 15 |
-
"num_attention_heads":
|
| 16 |
-
"num_hidden_layers":
|
| 17 |
"rotary_emb_base": 10000,
|
| 18 |
"rotary_pct": 0.25,
|
| 19 |
"tie_word_embeddings": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/home/ubuntu/llm/outputs/ft-synthetic-instruct-gptj-pairwise-pythia1.4b-deepspeed/resume/checkpoint-6000",
|
| 3 |
"architectures": [
|
| 4 |
"GPTNeoXForCausalLM"
|
| 5 |
],
|
| 6 |
"bos_token_id": 0,
|
| 7 |
"eos_token_id": 0,
|
| 8 |
"hidden_act": "gelu",
|
| 9 |
+
"hidden_size": 2048,
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 8192,
|
| 12 |
"layer_norm_eps": 1e-05,
|
| 13 |
"max_position_embeddings": 2048,
|
| 14 |
"model_type": "gpt_neox",
|
| 15 |
+
"num_attention_heads": 16,
|
| 16 |
+
"num_hidden_layers": 24,
|
| 17 |
"rotary_emb_base": 10000,
|
| 18 |
"rotary_pct": 0.25,
|
| 19 |
"tie_word_embeddings": false,
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5758948897
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c43c55421c925482e536ce0a68ea7a3c550e89234cb434788861328a42e27943
|
| 3 |
size 5758948897
|