-
System Info谢谢,公司服务无法联网 ReproductionOthersNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
from memos.configs.llm import LLMConfigFactory
from memos.llms.factory import LLMFactory
config = LLMConfigFactory.model_validate(
{
"backend": "huggingface",
"config": {
"model_name_or_path": "Qwen/Qwen3-1.7B",
"temperature": 0.8,
"max_tokens": 1024,
"top_p": 0.9,
"top_k": 50,
},
}
)
llm = LLMFactory.from_config(config)
messages = [
{"role": "user", "content": "Hello, who are you"},
]
response = llm.generate(messages)
print("Scenario 4:", response)
print("==" * 20) |
Beta Was this translation helpful? Give feedback.
-
|
谢谢 么么哒 |
Beta Was this translation helpful? Give feedback.
-
|
Hey @mitergpt, @Liulongfang and @louroy411-art! Thanks for the contribution — already solved the issue, thanks for helping us to improve our project! 📈 Btw if you enjoyed contributing and want to stay connected with the project, we run a Discord server for contributors, a chill space to discuss features, ask questions, or pick up new issues 👉🏻 MemOS Discord Server (Contributor Exclusive) Thanks again for shipping this, and happy MemOSing 🧠✨ |
Beta Was this translation helpful? Give feedback.
examples/basic_modules/llm.py里有使用本地模型的示例,修改model_name_or_path即可。