Instructions to use Dans-DiscountModels/Dans-TextSplitter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dans-DiscountModels/Dans-TextSplitter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dans-DiscountModels/Dans-TextSplitter")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Dans-DiscountModels/Dans-TextSplitter") model = AutoModelForCausalLM.from_pretrained("Dans-DiscountModels/Dans-TextSplitter") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Dans-DiscountModels/Dans-TextSplitter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dans-DiscountModels/Dans-TextSplitter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dans-DiscountModels/Dans-TextSplitter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Dans-DiscountModels/Dans-TextSplitter
- SGLang
How to use Dans-DiscountModels/Dans-TextSplitter 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 "Dans-DiscountModels/Dans-TextSplitter" \ --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": "Dans-DiscountModels/Dans-TextSplitter", "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 "Dans-DiscountModels/Dans-TextSplitter" \ --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": "Dans-DiscountModels/Dans-TextSplitter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Dans-DiscountModels/Dans-TextSplitter with Docker Model Runner:
docker model run hf.co/Dans-DiscountModels/Dans-TextSplitter
Delete config.json
Browse files- config.json +0 -33
config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "stabilityai/stablelm-2-1_6b",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"StableLMEpochForCausalLM"
|
| 5 |
-
],
|
| 6 |
-
"attention_dropout": 0.0,
|
| 7 |
-
"auto_map": {
|
| 8 |
-
"AutoConfig": "configuration_stablelm_epoch.StableLMEpochConfig",
|
| 9 |
-
"AutoModelForCausalLM": "modeling_stablelm_epoch.StableLMEpochForCausalLM"
|
| 10 |
-
},
|
| 11 |
-
"bos_token_id": null,
|
| 12 |
-
"eos_token_id": 100257,
|
| 13 |
-
"hidden_act": "silu",
|
| 14 |
-
"hidden_size": 2048,
|
| 15 |
-
"initializer_range": 0.02,
|
| 16 |
-
"intermediate_size": 5632,
|
| 17 |
-
"max_position_embeddings": 4096,
|
| 18 |
-
"model_type": "stablelm_epoch",
|
| 19 |
-
"norm_eps": 1e-05,
|
| 20 |
-
"num_attention_heads": 32,
|
| 21 |
-
"num_heads": 32,
|
| 22 |
-
"num_hidden_layers": 24,
|
| 23 |
-
"num_key_value_heads": 32,
|
| 24 |
-
"rope_pct": 0.25,
|
| 25 |
-
"rope_theta": 10000,
|
| 26 |
-
"rotary_scaling_factor": 1.0,
|
| 27 |
-
"tie_word_embeddings": false,
|
| 28 |
-
"torch_dtype": "bfloat16",
|
| 29 |
-
"transformers_version": "4.38.0.dev0",
|
| 30 |
-
"use_cache": false,
|
| 31 |
-
"use_qkv_bias": true,
|
| 32 |
-
"vocab_size": 100352
|
| 33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|