Instructions to use maheer/creek with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use maheer/creek with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maheer/creek", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("maheer/creek", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use maheer/creek with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maheer/creek" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maheer/creek", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/maheer/creek
- SGLang
How to use maheer/creek 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 "maheer/creek" \ --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": "maheer/creek", "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 "maheer/creek" \ --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": "maheer/creek", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use maheer/creek with Docker Model Runner:
docker model run hf.co/maheer/creek
从零开始构建的大模型
全过程源码(包含tokenizer训练,模型初始化,模型预训练,模型指令微调)
https://github.com/fisheeped/creek/tree/main
怎么简单使用
import transformers
# load model
model_path = "maheer/creek"
model = transformers.AutoModelForCausalLM.from_pretrained(model_path)
tokenizer = transformers.AutoTokenizer.from_pretrained(model_path)
massages = [
{"role":"user","content":"苹果手机怎么联网"}
]
def chat(msg):
inputs = tokenizer.apply_chat_template(msg,return_dict=True,return_tensors="pt")
input_len = len(inputs['input_ids'][0])
output = model.generate(**inputs,repetition_penalty = 1.25)[0]
output = output[input_len:]
return tokenizer.decode(output,skip_special_tokens=True)
out_str = chat(massages)
print(out_str)
output
您好!要将您的iPhone连接到互联网,请按照以下步骤操作:
1. 首先,打开“设备管理器”或“网络安全软件”。
2. 在主屏幕上找到“设备管理器”,点击它。
3. 在设备的设置界面中,选择“Wi-Fi和蓝牙”。
4. 在Wi-Fi选项卡下,找到“WiFi与Internet”选项并单击它。
5. 如果需要使用无线网络服务,可以尝试在路由器的控制面板中搜索“设备管理器”。
6. 如果无法通过 Wi-Fi 或 Internet Explorer 等其他方式进行登录,则可能需要输入密码才能访问该应用程序。
7. 如果以上方法都无法成功登录,那么您应该能够看到您的设备的网络状态(如已连接的Wi-Fi、未连接的Wi-Fi等)。如果您仍然遇到问题,请联系Apple的客户支持团队以获取帮助和支持。
8. 最后,如果一切正常,您可以通过按住电源按钮来关闭设备。此时,您的设备已经连接到了互联网,并且没有信号。
希望这些信息对您有所帮助。祝您生活愉快!
- Downloads last month
- 7