Instructions to use refactai/codify_medium_multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use refactai/codify_medium_multi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="refactai/codify_medium_multi", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("refactai/codify_medium_multi", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use refactai/codify_medium_multi with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "refactai/codify_medium_multi" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "refactai/codify_medium_multi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/refactai/codify_medium_multi
- SGLang
How to use refactai/codify_medium_multi 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 "refactai/codify_medium_multi" \ --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": "refactai/codify_medium_multi", "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 "refactai/codify_medium_multi" \ --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": "refactai/codify_medium_multi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use refactai/codify_medium_multi with Docker Model Runner:
docker model run hf.co/refactai/codify_medium_multi
Merge branch 'main' of https://huggingface.co/smallcloudai/codify_medium_multi into main
Browse files- config.json +55 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +5 -0
- tokenizer.json +0 -0
- tokenizer_config.json +9 -0
config.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"E": 1024,
|
| 3 |
+
"L": 24,
|
| 4 |
+
"T": 2048,
|
| 5 |
+
"_mup": true,
|
| 6 |
+
"alt_pw_klass": {
|
| 7 |
+
"type": ""
|
| 8 |
+
},
|
| 9 |
+
"alt_rel_klass": {
|
| 10 |
+
"fused": true,
|
| 11 |
+
"type": "alibi"
|
| 12 |
+
},
|
| 13 |
+
"alt_sa_klass": {
|
| 14 |
+
"triton": true,
|
| 15 |
+
"type": "flash",
|
| 16 |
+
"use_rotary_emb": null
|
| 17 |
+
},
|
| 18 |
+
"attn_a_reach": 2048,
|
| 19 |
+
"attn_b_reach": 2048,
|
| 20 |
+
"attn_heads": 32,
|
| 21 |
+
"attn_ra_nbasis": 64,
|
| 22 |
+
"attn_seq": [
|
| 23 |
+
"d"
|
| 24 |
+
],
|
| 25 |
+
"attn_sparse_layout_seq": null,
|
| 26 |
+
"backcheck_pw": "none",
|
| 27 |
+
"backcheck_sa": "none",
|
| 28 |
+
"bos_token_id": 1,
|
| 29 |
+
"dtype_acts": "torch.float16",
|
| 30 |
+
"dtype_weights": "torch.float16",
|
| 31 |
+
"enc_name": "openai_programming_v2",
|
| 32 |
+
"eos_token_id": 2,
|
| 33 |
+
"init_scale": 1,
|
| 34 |
+
"initializer_range": 0.02,
|
| 35 |
+
"layer_norm_epsilon": 1e-05,
|
| 36 |
+
"mlp_mult": 4,
|
| 37 |
+
"model_type": "codify",
|
| 38 |
+
"moe": null,
|
| 39 |
+
"mup_optimal_lr": 0.0005,
|
| 40 |
+
"mup_shapes_file": "lean_former/mup/flash_rot1d_24l/shapes.json",
|
| 41 |
+
"posemb": false,
|
| 42 |
+
"rescale_embeddings": false,
|
| 43 |
+
"tie_word_embeddings": false,
|
| 44 |
+
"transformers_version": "4.24.0",
|
| 45 |
+
"tune": [
|
| 46 |
+
3,
|
| 47 |
+
3,
|
| 48 |
+
3,
|
| 49 |
+
3
|
| 50 |
+
],
|
| 51 |
+
"unembedding_shared": false,
|
| 52 |
+
"use_cache": true,
|
| 53 |
+
"use_res_scale": false,
|
| 54 |
+
"vocab_size": 51305
|
| 55 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c5cb19eb24e76ed88e5771021170fecc289562ecc97f7314f8e1980779b3a6c
|
| 3 |
+
size 1419479419
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"unk_token": "<|endoftext|>"
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"eos_token": "<|endoftext|>",
|
| 5 |
+
"name_or_path": "smallcloudai/codify_medium_multi",
|
| 6 |
+
"special_tokens_map_file": "/home/user/.cache/huggingface/hub/models--smallcloudai--codify_medium_multi/snapshots/ae6835df6784621072944fcc3403ca89f1308f96/special_tokens_map.json",
|
| 7 |
+
"tokenizer_class": "CodifyTokenizer",
|
| 8 |
+
"unk_token": "<|endoftext|>"
|
| 9 |
+
}
|