Instructions to use lg/fexp_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lg/fexp_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lg/fexp_2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lg/fexp_2") model = AutoModelForCausalLM.from_pretrained("lg/fexp_2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lg/fexp_2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lg/fexp_2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lg/fexp_2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lg/fexp_2
- SGLang
How to use lg/fexp_2 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 "lg/fexp_2" \ --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": "lg/fexp_2", "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 "lg/fexp_2" \ --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": "lg/fexp_2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lg/fexp_2 with Docker Model Runner:
docker model run hf.co/lg/fexp_2
Add model
Browse files- config.json +63 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu_new",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GPTNeoForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0,
|
| 7 |
+
"attention_layers": [
|
| 8 |
+
"global",
|
| 9 |
+
"global",
|
| 10 |
+
"global",
|
| 11 |
+
"global",
|
| 12 |
+
"global",
|
| 13 |
+
"global",
|
| 14 |
+
"global",
|
| 15 |
+
"global",
|
| 16 |
+
"global",
|
| 17 |
+
"global",
|
| 18 |
+
"global",
|
| 19 |
+
"global",
|
| 20 |
+
"global",
|
| 21 |
+
"global",
|
| 22 |
+
"global",
|
| 23 |
+
"global",
|
| 24 |
+
"global",
|
| 25 |
+
"global",
|
| 26 |
+
"global",
|
| 27 |
+
"global",
|
| 28 |
+
"global",
|
| 29 |
+
"global",
|
| 30 |
+
"global",
|
| 31 |
+
"global"
|
| 32 |
+
],
|
| 33 |
+
"attention_types": [
|
| 34 |
+
[
|
| 35 |
+
[
|
| 36 |
+
"global"
|
| 37 |
+
],
|
| 38 |
+
24
|
| 39 |
+
]
|
| 40 |
+
],
|
| 41 |
+
"bos_token_id": 50256,
|
| 42 |
+
"embed_dropout": 0,
|
| 43 |
+
"eos_token_id": 50256,
|
| 44 |
+
"gradient_checkpointing": false,
|
| 45 |
+
"hidden_size": 2048,
|
| 46 |
+
"initializer_range": 0.02,
|
| 47 |
+
"intermediate_size": null,
|
| 48 |
+
"layer_norm_epsilon": 1e-05,
|
| 49 |
+
"max_position_embeddings": 2048,
|
| 50 |
+
"model_type": "gpt_neo",
|
| 51 |
+
"num_heads": 32,
|
| 52 |
+
"num_layers": 24,
|
| 53 |
+
"resid_dropout": 0,
|
| 54 |
+
"summary_activation": null,
|
| 55 |
+
"summary_first_dropout": 0.1,
|
| 56 |
+
"summary_proj_to_labels": true,
|
| 57 |
+
"summary_type": "cls_index",
|
| 58 |
+
"summary_use_proj": true,
|
| 59 |
+
"transformers_version": "4.5.0.dev0",
|
| 60 |
+
"use_cache": true,
|
| 61 |
+
"vocab_size": 50257,
|
| 62 |
+
"window_size": 256
|
| 63 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0cfcd9358443c7163e01910baf97fe3e638efe36ed12bdb82aaf7b27152e6ce5
|
| 3 |
+
size 5363084980
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"errors": "replace", "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "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"}, "add_prefix_space": false, "model_max_length": 2048, "special_tokens_map_file": null, "name_or_path": "gpt2"}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|