Text Generation
Transformers
Safetensors
gpt_neox
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use miguel-kjh/pythia-70m_instruction_code_tuning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use miguel-kjh/pythia-70m_instruction_code_tuning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="miguel-kjh/pythia-70m_instruction_code_tuning")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("miguel-kjh/pythia-70m_instruction_code_tuning") model = AutoModelForCausalLM.from_pretrained("miguel-kjh/pythia-70m_instruction_code_tuning") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use miguel-kjh/pythia-70m_instruction_code_tuning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "miguel-kjh/pythia-70m_instruction_code_tuning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "miguel-kjh/pythia-70m_instruction_code_tuning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/miguel-kjh/pythia-70m_instruction_code_tuning
- SGLang
How to use miguel-kjh/pythia-70m_instruction_code_tuning 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 "miguel-kjh/pythia-70m_instruction_code_tuning" \ --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": "miguel-kjh/pythia-70m_instruction_code_tuning", "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 "miguel-kjh/pythia-70m_instruction_code_tuning" \ --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": "miguel-kjh/pythia-70m_instruction_code_tuning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use miguel-kjh/pythia-70m_instruction_code_tuning with Docker Model Runner:
docker model run hf.co/miguel-kjh/pythia-70m_instruction_code_tuning
Upload GPTNeoXForCausalLM
Browse files- config.json +16 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -19,11 +19,26 @@
|
|
| 19 |
"num_attention_heads": 8,
|
| 20 |
"num_hidden_layers": 6,
|
| 21 |
"pad_token_id": 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
"rope_scaling": null,
|
| 23 |
"rotary_emb_base": 10000,
|
| 24 |
"rotary_pct": 0.25,
|
| 25 |
"tie_word_embeddings": false,
|
| 26 |
-
"torch_dtype": "
|
| 27 |
"transformers_version": "4.42.3",
|
| 28 |
"use_cache": true,
|
| 29 |
"use_parallel_residual": true,
|
|
|
|
| 19 |
"num_attention_heads": 8,
|
| 20 |
"num_hidden_layers": 6,
|
| 21 |
"pad_token_id": 0,
|
| 22 |
+
"quantization_config": {
|
| 23 |
+
"_load_in_4bit": true,
|
| 24 |
+
"_load_in_8bit": false,
|
| 25 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 26 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 27 |
+
"bnb_4bit_quant_type": "nf4",
|
| 28 |
+
"bnb_4bit_use_double_quant": false,
|
| 29 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 30 |
+
"llm_int8_has_fp16_weight": false,
|
| 31 |
+
"llm_int8_skip_modules": null,
|
| 32 |
+
"llm_int8_threshold": 6.0,
|
| 33 |
+
"load_in_4bit": true,
|
| 34 |
+
"load_in_8bit": false,
|
| 35 |
+
"quant_method": "bitsandbytes"
|
| 36 |
+
},
|
| 37 |
"rope_scaling": null,
|
| 38 |
"rotary_emb_base": 10000,
|
| 39 |
"rotary_pct": 0.25,
|
| 40 |
"tie_word_embeddings": false,
|
| 41 |
+
"torch_dtype": "float16",
|
| 42 |
"transformers_version": "4.42.3",
|
| 43 |
"use_cache": true,
|
| 44 |
"use_parallel_residual": true,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f412b68b0502219928444040879b846679572d2e233599fefc3035dfcda21ea3
|
| 3 |
+
size 113742442
|