Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError occurred while building Agent: [Errno 2] No such file or directory: 'Checkpoints/fish-agent-v0.1-3b/tokenizer. tiktoken' issue #812

Closed
6 tasks done
LavenderEstela opened this issue Jan 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@LavenderEstela
Copy link

Self Checks

  • This template is only for bug reports. For questions, please visit Discussions.
  • I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. English 中文 日本語 Portuguese (Brazil)
  • I have searched for existing issues, including closed ones. Search issues
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template and fill in all required fields.

Cloud or Self Hosted

Self Hosted (Source)

Environment Details

  1. conda fish-speech python=3.10
  2. fish-speech-1.5 Linux
  3. read start_agent.md、index.md

Steps to Reproduce

Q1:No such file or directory: 'Checkpoints/fish-agent-v0.1-3b/tokenizer. tiktoken'
1.follow start_agent.md to download model like this:huggingface-cli download fishaudio/fish-agent-v0.1-3b --local-dir checkpoints/fish-agent-v0.1-3b
2.Run on the console:python -m tools.api_server --llama-checkpoint-path checkpoints/fish-agent-v0.1-3b/ --mode agent --compile
3.FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/fish-agent-v0.1-3b/tokenizer.tiktoken'
4.I visited https://huggingface.co/fishaudio/fish-agent-v0.1-3b/tree/main,No file named tokenizer. tiktoken was found, and the code File "/media/ubuntu/Data-ssd0/Github/Fish Speech/fish speech main/fish_stpeech/tokenizer. py", line 89, in load_tiktoken_ppe
for line in open(tiktoken_bpe_file).read().splitlines():
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/fish-agent-v0.1-3b/tokenizer.tiktoken'

1736480678630

Q2:I have successfully started the API service and am able to access it http://localhost:9090/v1/tts I obtained the audio, but when I submitted the test in JSON format using/v1/chat provided by localhost: 9090, I encountered the following error:
{
"statusCode": 500,
"message": "'ModelManager' object has no attribute 'tokenizer'",
"error": "Internal Server Error"
}
1.Run on the console:python -m tools.api_server
--listen 0.0.0.0:8080
--llama-checkpoint-path "checkpoints/fish-speech-1.5"
--decoder-checkpoint-path "checkpoints/fish-speech-1.5/firefly-gan-vq-fsq-8x1024-21hz-generator.pth"
--decoder-config-name firefly_gan_vq
--compile
2.use apifox with json:
{
"messages": [
{
"role": "assistant",
"parts": [
{
"type": "vq",
"codes": [
[
0
]
]
},
{
"type": "text",
"text": "世上还有很多美好的事物等着你,别抱怨、更不要放弃,所以你要内心温柔,安静努力。"
}
]
}
],
"max_new_tokens": 1024,
"top_p": 0.7,
"repetition_penalty": 1.2,
"temperature": 0.7,
"streaming": false,
"num_samples": 1,
"early_stop_threshold": 1
}
3.on the console:
{
"statusCode": 500,
"message": "'ModelManager' object has no attribute 'tokenizer'",
"error": "Internal Server Error"
}

1736481385734

I want to know if it's not possible to use/v1/chat in this way?

✔️ Expected Behavior

1.Successfully started the agent
2.The HTTP status code should be 200

❌ Actual Behavior

1.Failed to start
2.The HTTP status code is 500

@LavenderEstela LavenderEstela added the bug Something isn't working label Jan 10, 2025
@LavenderEstela
Copy link
Author

I have solved the first problem, the solution is to copy a copy of the tokenizer.tiktoken under fish-speech-1.5 to fish-agent-v0.1-3b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant