Views
No views yet
| 🤖 Model | 📏 Context Length | ⬇️ Download |
|---|---|---|
| MindLink 32B | 128K | 🤗 HuggingFace |
| MindLink 72B | 128K | 🤗 HuggingFace |
⚠️ Please make sure you have installedtransformers>=4.51.0. Lower versions are not supported.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "Skywork/MindLink-32B-0801"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="auto",
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained(model_name)
11
12prompt = "What is the capital of China?"
13messages = [
14 {"role": "user", "content": prompt}
15]
16text = tokenizer.apply_chat_template(
17 messages,
18 tokenize=False,
19 add_generation_prompt=True
20)
21model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
22
23generated_ids = model.generate(
24 **model_inputs,
25 max_new_tokens=512
26)
27generated_ids = [
28 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
29]
30
31response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]python -m sglang.launch_server --model-path Skywork/MindLink-32B-0801curl:1curl -X POST https://sd2690u280c6ft26qcdi0.apigateway-cn-beijing.volceapi.com/v1/chat/completions \
2 -H "Authorization: Bearer nc6Dt7DrLJNzLELiqOR1bogO5Oh1qHtO" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "Mind_Link_beta_32B",
6 "messages": [
7 {"role": "user", "content": "What is the capital of China?"}
8 ],
9 "temperature": 0.7,
10 "max_tokens": 128,
11 "stream": false
12 }'1import requests
2
3API_KEY = "nc6Dt7DrLJNzLELiqOR1bogO5Oh1qHtO"
4API_URL = "https://sd2690u280c6ft26qcdi0.apigateway-cn-beijing.volceapi.com/v1/chat/completions"
5
6headers = {
7 "Authorization": f"Bearer {API_KEY}",
8 "Content-Type": "application/json"
9}
10
11payload = {
12 "model": "Mind_Link_beta_32B",
13 "messages": [
14 {"role": "user", "content": "What is the capital of China?"}
15 ],
16 "temperature": 0.7,
17 "max_tokens": 128,
18 "stream": False
19}
20
21response = requests.post(API_URL, headers=headers, json=payload)
22
23if response.status_code == 200:
24 reply = response.json()
25 print("MindLink Response:")
26 print(reply["choices"][0]["message"]["content"])
27else:
28 print(f"Error {response.status_code}: {response.text}")https://sd2690u280c6ft26qcdi0.apigateway-cn-beijing.volceapi.com/v1/chat/completionsAuthorization: Bearer <api_key>model, messages, temperature, top_p, max_tokens, stream, stop, etc."Mind_Link_beta_32B" or "Mind_Link_beta_72B""nc6Dt7DrLJNzLELiqOR1bogO5Oh1qHtO" (requests via this key enter a queue and have limited request rates; contact us for unlimited access).