Text Generation
Transformers
Safetensors
English
phi
nlp
phi-2
instruct
conversational
custom_code
Eval Results (legacy)
text-generation-inference
Instructions to use prince-canuma/Damysus-2.7B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prince-canuma/Damysus-2.7B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prince-canuma/Damysus-2.7B-Chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prince-canuma/Damysus-2.7B-Chat", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("prince-canuma/Damysus-2.7B-Chat", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prince-canuma/Damysus-2.7B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prince-canuma/Damysus-2.7B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prince-canuma/Damysus-2.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prince-canuma/Damysus-2.7B-Chat
- SGLang
How to use prince-canuma/Damysus-2.7B-Chat 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 "prince-canuma/Damysus-2.7B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prince-canuma/Damysus-2.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "prince-canuma/Damysus-2.7B-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prince-canuma/Damysus-2.7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prince-canuma/Damysus-2.7B-Chat with Docker Model Runner:
docker model run hf.co/prince-canuma/Damysus-2.7B-Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,9 +30,12 @@ model-index:
|
|
| 30 |
|
| 31 |
- task:
|
| 32 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 33 |
metrics:
|
| 34 |
-
- name:
|
| 35 |
-
type:
|
| 36 |
value: 59.81
|
| 37 |
verified: true
|
| 38 |
source:
|
|
@@ -41,8 +44,11 @@ model-index:
|
|
| 41 |
|
| 42 |
- task:
|
| 43 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 44 |
metrics:
|
| 45 |
-
- name:
|
| 46 |
type: acc
|
| 47 |
value: 74.52
|
| 48 |
verified: true
|
|
@@ -52,8 +58,11 @@ model-index:
|
|
| 52 |
|
| 53 |
- task:
|
| 54 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 55 |
metrics:
|
| 56 |
-
- name:
|
| 57 |
type: acc
|
| 58 |
value: 56.33
|
| 59 |
verified: true
|
|
@@ -63,9 +72,12 @@ model-index:
|
|
| 63 |
|
| 64 |
- task:
|
| 65 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 66 |
metrics:
|
| 67 |
-
- name:
|
| 68 |
-
type:
|
| 69 |
value: 46.74
|
| 70 |
verified: true
|
| 71 |
source:
|
|
@@ -74,8 +86,11 @@ model-index:
|
|
| 74 |
|
| 75 |
- task:
|
| 76 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 77 |
metrics:
|
| 78 |
-
- name:
|
| 79 |
type: acc
|
| 80 |
value: 75.06
|
| 81 |
verified: true
|
|
@@ -85,8 +100,11 @@ model-index:
|
|
| 85 |
|
| 86 |
- task:
|
| 87 |
type: text-generation
|
|
|
|
|
|
|
|
|
|
| 88 |
metrics:
|
| 89 |
-
- name:
|
| 90 |
type: acc
|
| 91 |
value: 50.64
|
| 92 |
verified: true
|
|
|
|
| 30 |
|
| 31 |
- task:
|
| 32 |
type: text-generation
|
| 33 |
+
dataset:
|
| 34 |
+
name: ARC (25-shot)
|
| 35 |
+
type: ai2_arc
|
| 36 |
metrics:
|
| 37 |
+
- name: Accuracy Norm
|
| 38 |
+
type: acc_norm
|
| 39 |
value: 59.81
|
| 40 |
verified: true
|
| 41 |
source:
|
|
|
|
| 44 |
|
| 45 |
- task:
|
| 46 |
type: text-generation
|
| 47 |
+
dataset:
|
| 48 |
+
name: Hellaswag (10-shot)
|
| 49 |
+
type: Hellaswag
|
| 50 |
metrics:
|
| 51 |
+
- name: Accuracy Norm
|
| 52 |
type: acc
|
| 53 |
value: 74.52
|
| 54 |
verified: true
|
|
|
|
| 58 |
|
| 59 |
- task:
|
| 60 |
type: text-generation
|
| 61 |
+
dataset:
|
| 62 |
+
name: MMLU (5-shot)
|
| 63 |
+
type: MMLU
|
| 64 |
metrics:
|
| 65 |
+
- name: Accuracy
|
| 66 |
type: acc
|
| 67 |
value: 56.33
|
| 68 |
verified: true
|
|
|
|
| 72 |
|
| 73 |
- task:
|
| 74 |
type: text-generation
|
| 75 |
+
dataset:
|
| 76 |
+
name: Truthful QA
|
| 77 |
+
type: Truthful_QA
|
| 78 |
metrics:
|
| 79 |
+
- name: Multi-true
|
| 80 |
+
type: mc2
|
| 81 |
value: 46.74
|
| 82 |
verified: true
|
| 83 |
source:
|
|
|
|
| 86 |
|
| 87 |
- task:
|
| 88 |
type: text-generation
|
| 89 |
+
dataset:
|
| 90 |
+
name: Winogrande (5-shot)
|
| 91 |
+
type: Winogrande
|
| 92 |
metrics:
|
| 93 |
+
- name: Accuracy
|
| 94 |
type: acc
|
| 95 |
value: 75.06
|
| 96 |
verified: true
|
|
|
|
| 100 |
|
| 101 |
- task:
|
| 102 |
type: text-generation
|
| 103 |
+
dataset:
|
| 104 |
+
name: GSM8K (5-shot)
|
| 105 |
+
type: GSM8K
|
| 106 |
metrics:
|
| 107 |
+
- name: Accuracy
|
| 108 |
type: acc
|
| 109 |
value: 50.64
|
| 110 |
verified: true
|