Text Generation
Transformers
Safetensors
English
lfm2
text-generation-inference
unsloth
conversational
Instructions to use smjain/sap-archgen-lfm2-230M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smjain/sap-archgen-lfm2-230M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="smjain/sap-archgen-lfm2-230M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("smjain/sap-archgen-lfm2-230M") model = AutoModelForCausalLM.from_pretrained("smjain/sap-archgen-lfm2-230M", 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 smjain/sap-archgen-lfm2-230M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "smjain/sap-archgen-lfm2-230M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smjain/sap-archgen-lfm2-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/smjain/sap-archgen-lfm2-230M
- SGLang
How to use smjain/sap-archgen-lfm2-230M 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 "smjain/sap-archgen-lfm2-230M" \ --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": "smjain/sap-archgen-lfm2-230M", "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 "smjain/sap-archgen-lfm2-230M" \ --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": "smjain/sap-archgen-lfm2-230M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use smjain/sap-archgen-lfm2-230M with Docker Model Runner:
docker model run hf.co/smjain/sap-archgen-lfm2-230M
Upload eval-procurement-copilot.spec.json with huggingface_hub
Browse files
eval-procurement-copilot.spec.json
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"title": "Procurement — chat",
|
| 3 |
+
"blocks": [
|
| 4 |
+
{
|
| 5 |
+
"id": "external",
|
| 6 |
+
"label": "External",
|
| 7 |
+
"blocks": [],
|
| 8 |
+
"components": [
|
| 9 |
+
{
|
| 10 |
+
"id": "c0",
|
| 11 |
+
"label": "End User"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"id": "c1",
|
| 15 |
+
"label": "Desktop / Mobile"
|
| 16 |
+
}
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"id": "sap_btp",
|
| 21 |
+
"label": "SAP BTP",
|
| 22 |
+
"blocks": [
|
| 23 |
+
{
|
| 24 |
+
"id": "sap_cloud_iden",
|
| 25 |
+
"label": "SAP Cloud Identity Services",
|
| 26 |
+
"blocks": [],
|
| 27 |
+
"components": [
|
| 28 |
+
{
|
| 29 |
+
"id": "c2",
|
| 30 |
+
"label": "Identity Authentication"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"id": "c3",
|
| 34 |
+
"label": "Identity Directory"
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "subaccount",
|
| 40 |
+
"label": "Subaccount",
|
| 41 |
+
"blocks": [
|
| 42 |
+
{
|
| 43 |
+
"id": "sap_ai",
|
| 44 |
+
"label": "SAP AI",
|
| 45 |
+
"blocks": [],
|
| 46 |
+
"components": [
|
| 47 |
+
{
|
| 48 |
+
"id": "c8",
|
| 49 |
+
"label": "SAP Generative AI Hub"
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"id": "c9",
|
| 53 |
+
"label": "SAP AI Core"
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"id": "c10",
|
| 57 |
+
"label": "SAP AI Launchpad"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"id": "c11",
|
| 61 |
+
"label": "SAP Destination service"
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"id": "c12",
|
| 65 |
+
"label": "SAP Destination service"
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"id": "c13",
|
| 69 |
+
"label": "SAP Destination service"
|
| 70 |
+
}
|
| 71 |
+
]
|
| 72 |
+
}
|
| 73 |
+
],
|
| 74 |
+
"components": [
|
| 75 |
+
{
|
| 76 |
+
"id": "c4",
|
| 77 |
+
"label": "SAP Build Work Zone"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"id": "c5",
|
| 81 |
+
"label": "CAP Application"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"id": "c6",
|
| 85 |
+
"label": "SAP HANA Cloud"
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"id": "c12",
|
| 89 |
+
"label": "SAP Destination service"
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"id": "c13",
|
| 93 |
+
"label": "SAP Destination service"
|
| 94 |
+
}
|
| 95 |
+
]
|
| 96 |
+
}
|
| 97 |
+
],
|
| 98 |
+
"components": []
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"id": "on-premise",
|
| 102 |
+
"label": "On-Premise",
|
| 103 |
+
"blocks": [],
|
| 104 |
+
"components": [
|
| 105 |
+
{
|
| 106 |
+
"id": "c14",
|
| 107 |
+
"label": "Cloud Connector"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"id": "c15",
|
| 111 |
+
"label": "SAP S/4HANA"
|
| 112 |
+
}
|
| 113 |
+
]
|
| 114 |
+
}
|
| 115 |
+
],
|
| 116 |
+
"connections": [
|
| 117 |
+
{
|
| 118 |
+
"source": "c0",
|
| 119 |
+
"target": "c4"
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"source": "c4",
|
| 123 |
+
"target": "c5"
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"source": "c5",
|
| 127 |
+
"target": "c8"
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"source": "c8",
|
| 131 |
+
"target": "c9"
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"source": "c5",
|
| 135 |
+
"target": "c6"
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"source": "c4",
|
| 139 |
+
"target": "c2",
|
| 140 |
+
"label": "SSO"
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"source": "c9",
|
| 144 |
+
"target": "c10",
|
| 145 |
+
"label": "manage"
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"source": "c5",
|
| 149 |
+
"target": "c11"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"source": "c5",
|
| 153 |
+
"target": "c12"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"source": "c12",
|
| 157 |
+
"target": "c13"
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"source": "c13",
|
| 161 |
+
"target": "c14"
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"source": "c14",
|
| 165 |
+
"target": "c15",
|
| 166 |
+
"label": "read"
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"source": "c14",
|
| 170 |
+
"target": "c15",
|
| 171 |
+
"label": "read"
|
| 172 |
+
}
|
| 173 |
+
]
|
| 174 |
+
}
|