Instructions to use Funybubble/replit-code-instruct-quanatized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Funybubble/replit-code-instruct-quanatized with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Funybubble/replit-code-instruct-quanatized", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Funybubble/replit-code-instruct-quanatized", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Funybubble/replit-code-instruct-quanatized", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Funybubble/replit-code-instruct-quanatized with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Funybubble/replit-code-instruct-quanatized" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Funybubble/replit-code-instruct-quanatized", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Funybubble/replit-code-instruct-quanatized
- SGLang
How to use Funybubble/replit-code-instruct-quanatized 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 "Funybubble/replit-code-instruct-quanatized" \ --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": "Funybubble/replit-code-instruct-quanatized", "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 "Funybubble/replit-code-instruct-quanatized" \ --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": "Funybubble/replit-code-instruct-quanatized", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Funybubble/replit-code-instruct-quanatized with Docker Model Runner:
docker model run hf.co/Funybubble/replit-code-instruct-quanatized
Commit ·
c847327
1
Parent(s): b1a4ddc
Update config.json
Browse files- config.json +5 -6
config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "F:/model/pytorch_model-00002-of-00002.bin",
|
| 3 |
"architectures": [
|
| 4 |
"MPTForCausalLM"
|
| 5 |
],
|
|
@@ -16,8 +15,8 @@
|
|
| 16 |
"softmax_scale": null
|
| 17 |
},
|
| 18 |
"auto_map": {
|
| 19 |
-
"AutoConfig": "
|
| 20 |
-
"AutoModelForCausalLM": "
|
| 21 |
},
|
| 22 |
"d_model": 2560,
|
| 23 |
"emb_pdrop": 0,
|
|
@@ -45,9 +44,9 @@
|
|
| 45 |
"norm_type": "low_precision_layernorm",
|
| 46 |
"resid_pdrop": 0,
|
| 47 |
"tokenizer_name": "teknium/Replit-v2-CodeInstruct-3B",
|
| 48 |
-
"torch_dtype": "
|
| 49 |
-
"transformers_version": "4.
|
| 50 |
"use_cache": false,
|
| 51 |
"verbose": 0,
|
| 52 |
"vocab_size": 32768
|
| 53 |
-
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"MPTForCausalLM"
|
| 4 |
],
|
|
|
|
| 15 |
"softmax_scale": null
|
| 16 |
},
|
| 17 |
"auto_map": {
|
| 18 |
+
"AutoConfig": "configuration_mpt.MPTConfig",
|
| 19 |
+
"AutoModelForCausalLM": "modeling_mpt.MPTForCausalLM"
|
| 20 |
},
|
| 21 |
"d_model": 2560,
|
| 22 |
"emb_pdrop": 0,
|
|
|
|
| 44 |
"norm_type": "low_precision_layernorm",
|
| 45 |
"resid_pdrop": 0,
|
| 46 |
"tokenizer_name": "teknium/Replit-v2-CodeInstruct-3B",
|
| 47 |
+
"torch_dtype": "float16",
|
| 48 |
+
"transformers_version": "4.29.2",
|
| 49 |
"use_cache": false,
|
| 50 |
"verbose": 0,
|
| 51 |
"vocab_size": 32768
|
| 52 |
+
}
|