Hi @Neph0s 🤗 Niels here from the open-source team at Hugging Face. I discovered your work through Hugging Face's daily papers as yours got featured: https://huggingface.co/papers/2502.09082. The paper page lets people discuss about your paper and lets them find artifacts about it (your models, datasets or demo for instance), you can also claim the paper as yours which will show up on your public profile at HF. It'd be great to make the checkpoints and dataset available on the 🤗 hub, to improve their discoverability/visibility once they are released in February 2025. We can add tags so that people find them when filtering https://huggingface.co/models and https://huggingface.co/datasets. ## Uploading models See here for a guide: https://huggingface.co/docs/hub/models-uploading. In this case, we could leverage the [PyTorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) class which adds `from_pretrained` and `push_to_hub` to any custom `nn.Module`. Alternatively, one can leverages the [hf_hub_download](https://huggingface.co/docs/huggingface_hub/en/guides/download#download-a-single-file) one-liner to download a checkpoint from the hub. We encourage researchers to push each model checkpoint to a separate model repository, so that things like download stats also work. We can then also link the checkpoints to the paper page. ## Uploading dataset Would be awesome to make the dataset available on 🤗 , so that people can do: ```python from datasets import load_dataset dataset = load_dataset("your-hf-org-or-username/your-dataset") ``` See here for a guide: https://huggingface.co/docs/datasets/loading. Besides that, there's the [dataset viewer](https://huggingface.co/docs/hub/en/datasets-viewer) which allows people to quickly explore the first few rows of the data in the browser. Let me know if you're interested/need any help regarding this! Cheers, Niels ML Engineer @ HF 🤗 Thanks, Niels! I'm currently working on releasing these resources to the open-source community. Looking forward to contributing to Hugging Face soon. Hi @NielsRogge , I'm currently in the process of uploading my datasets and models to Hugging Face. However, I've encountered a rate limit issue with the following message: 'You have been rate-limited; you can retry this action in about 1 hour. If you're a new user, your limits will raise progressively over time. Get in touch with us at website@huggingface.co if you need access now.' As I'm eager to contribute these resources to the community, I was wondering if you might be able to help with this limitation or suggest an alternative approach for uploading larger collections of files. Thank you for your assistance! Hi, That's interesting, what's your dataset size? Can you retry? The dataset is less than 1GB in total, but it's split into 771 individual files (one for each book). I believe this format is more convenient for users who want to explore specific books and characters they're interested in. My current strategy is to wait one hour after hitting the upload limit and then retry. Yes it should work! I assume you're using `dataset.push_to_hub`? I use api.upload_file(), and i found that each individual file upload generates a separate commit in the repository history. Anyway, I am almost there. The resources have been fully released. Great, I've opened https://huggingface.co/Neph0s/CoSER-Llama-3.1-70B/discussions/1 which improves the model's metadata. Feel free to merge I hope you can provide a sample code for using the model. How to inject the prompt words? Definitely. I have provided an example code. Please check our latest README and example code. Basically, CoSER models accept prompts in all kinds of formats (although prompt engineering may be needed for best performance). However, the only important thing is that, we strongly recommend activating inner thoughts for LLMs by adding the following prompts: > Use [your thought] for thoughts, which others can't see. Use (your action) for actions, which others can see. Thank you for your open source work, but I had a problem continuing the research. The model.safetensors.index.json is expecting 30 shards (as indicated by 00015-of-00030), but only 15 are provided. Thank you for reporting this issue! The 15 .safetensors files are complete and should contain all model weights. The index file is a legacy artifact and can be safely ignored in this case. Previously, I deploy the model via vllm and it works well. Could you confirm whether you’re able to successfully ​load and use the model despite the mismatched model.safetensors.index.json file? We will ​regenerate the model.safetensors.index.json file shortly to ensure compatibility with all loading workflows. Excellent work! But I've encountered a similar problem in loading the model weights. How do you load your model with the `chat.py`? I've tried your code, but it seems that it tries to find `00015-00030.safetensors`. I've also tried using vllm, but it doesn't work. I don't know whether I operate in the right way. Could you please provide an instruction of how to load the model from the beginning? Thanks very much! Hi @FFFiiiii and @maple-zhou, Thank you for reporting this issue and your patience! I've **fixed this problem** by regenerating the correct `model.safetensors.index.json` file and updating the repository. Here's the detail: - **Root Cause**: The previous `model.safetensors.index.json` was **incorrect** (erroneously referencing 30 shards) and **unused** in our workflow. During internal deployment via vLLM, we skipped this file. Now the 70B model should be able to be correctly loaded. Update the `model.safetensors.index.json` file if you have downloaded it to local path. Your feedback has been invaluable in improving the model’s compatibility – thank you for helping make this project more robust! Let me know if you encounter any other issues. 作者你好,huggingface的数据现在没有了 能截个图吗?我这里看是有的。 对不起,我的梯子问题,耽误大佬时间了,抱歉 i choose any character cant response my query It seems to work now. Can you try it again? > It seems to work now. Can you try it again? yes, it work now, but the button of creating character can't work? Yes. Character Hub only accepts files in the same format of ours, which requires running our code. (However, we recently disabled online running for limited api resources.) If you want to run the code locally and upload your result, we are welcome and will activate the button. > Yes. Character Hub only accepts files in the same format of ours, which requires running our code. (However, we recently disabled online running for limited api resources.) > > If you want to run the code locally and upload your result, we are welcome and will activate the button. ok, thank you I'll close this issue. I see that there are many characters and their JSON format data on the website, and I want to know if the dialogues in these JSON format data will be used for inference, whether they are all directly placed in the prompt or retrieves the relevant dialogues by RAG. By default, dialogues will not be included in the prompt. The prompt is composed of character profile & scenario context, excluding experiences or dialogues. To enable retrieval, set this arg - --retrieval: Enable retrieval augmentation [None|raw_text|expr1|expr3|conv1|expr3_conv1|expr10_conv1] Can this model only role-play for a single plot in a book? because I see that the scenario, motivation, and other_character_profiles_str required by the system prompt are all role-playing for a single plot in the book. What if I wanted this model to play a specific role, but not limited to a certain plot? CoSER models can be applied for any form of role-play, with arbitrary kinds of prompts. During training, we train our models with comprehensive prompt types and character types, so the models learned general role-play. We've tested its performance in general role-play (as shown in our provided cases), and the models work pretty well. Hi, 看起来huggingface测试集合有问题: ``` (convagent) [zdeng@tooarrana1]/fred/oz401/zdeng% python /fred/oz401/zdeng/genagents/coser_datset.py Generating train split: 301748 examples [00:33, 8950.63 examples/s] Generating test split: 0 examples [00:00, ? examples/s] Traceback (most recent call last): File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/builder.py", line 1871, in _prepare_split_single writer.write_table(table) File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/arrow_writer.py", line 643, in write_table pa_table = table_cast(pa_table, self._schema) File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/table.py", line 2293, in table_cast return cast_table_to_schema(table, schema) File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/table.py", line 2241, in cast_table_to_schema raise CastError( datasets.table.CastError: Couldn't cast scenario: string topic: string key_characters: list> child 0, item: struct child 0, motivation: string child 1, name: string dialogues: list> child 0, item: struct child 0, character: string child 1, message: string speaking_characters_w_env: list child 0, item: string major_characters: list child 0, item: string weight: double plot: struct>, prominence: int64, state: string, summary: string> child 0, chapter: string child 1, i_chunk: int64 child 2, i_p: int64 child 3, key_characters: list> child 0, item: struct child 0, description: string child 1, name: string child 2, summary: string child 4, prominence: int64 child 5, state: string child 6, summary: string character_profiles: struct dataset = datasets.load_dataset("Neph0s/CoSER", cache_dir="/fred/oz401/zdeng/genagents/data") File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/load.py", line 2084, in load_dataset builder_instance.download_and_prepare( File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/builder.py", line 925, in download_and_prepare self._download_and_prepare( File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/builder.py", line 1001, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/builder.py", line 1742, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/fred/oz339/zdeng/.conda/envs/convagent/lib/python3.10/site-packages/datasets/builder.py", line 1873, in _prepare_split_single raise DatasetGenerationCastError.from_cast_error( datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset All the data files must have the same columns, but at some point there are 13 new columns ({'weight', 'character_profiles', 'speaking_characters_w_env', 'tag', 'book', 'plot', 'i_c', 'dialogues', 'i_p', 'major_characters', 'topic', 'scenario', 'key_characters'}) and 1 missing columns ({'conversations'}). This happened while the json dataset builder was generating data using hf://datasets/Neph0s/CoSER/test/test_set.json (at revision 2446f97a077975e2cda8a7eaad20c201089c66f9) Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations) ``` 我们没有实现这个读取方式。关于使用我们的测试集进行评估,请参考: `python gca_evaluation/main.py --test_file data/test/test_set.json --actor_model gpt-4o --judge_model gpt-4o` huggingface的训练集也打不开,通过load_dataset,麻烦看一下 Hi @Neph0s :octocat: I have got an unexpected output of the model that is inconsistent with the demo results. 😢 `Starting Conversation. Type 'exit' to quit You: "Where am I? What are you doing???" Character: I'm sorry, but I can't assist with that.` I have used the same system prompt as the demo file chat_cases.json Thank you!! ### Description In the CoSER dataset, there is an entry under **Book 3 (`Prisoner of Azkaban`)** with the field: ```json "chapter": "The Riddle House" ```` However, *"The Riddle House"* is **Chapter 1 of Book 4 (`Goblet of Fire`)**, not part of Book 3. --- ### Evidence * **Book 3** canonical chapters (22 total) start with *"Owl Post"* and do **not** contain *"The Riddle House"*. * **Book 4** canonical chapters (37 total) start with *"The Riddle House"*. * The scenario content in the dataset (Frank Bryce, Voldemort, Wormtail in the Riddle House) exactly matches events from Book 4, Chapter 1. --- ### Impact * Incorrect book–chapter mapping could cause: * Retrieval mismatches * Incorrect temporal alignment in point-in-time datasets * Fine-tuning data contamination with wrong period context * Models trained on this data may produce historically inaccurate responses. --- ### Steps to Reproduce 1. Load the CoSER dataset. 2. Filter for Book 3 entries. 3. Locate any entry with: ```json "chapter": "The Riddle House" ``` 4. Read its `scenario` and `dialogues`. 5. Confirm that the content matches Book 4, Chapter 1 events. --- ### Suggested Fix * Move this entry from **Book 3** to **Book 4**. * Update its `chapter_index` to `1`. * Retain existing text content, as it is correct for Book 4’s first chapter. --- ### References * [[HP Wiki – List of chapters in the Harry Potter books](https://harrypotter.fandom.com/wiki/List_of_chapters_in_the_Harry_Potter_books)](https://harrypotter.fandom.com/wiki/List_of_chapters_in_the_Harry_Potter_books) * [[HP Wiki – The Riddle House (Chapter)](https://harrypotter.fandom.com/wiki/The_Riddle_House)](https://harrypotter.fandom.com/wiki/The_Riddle_House) Thanks for bringing this to our attention. There exist some mismatch issues in the 'chapter' values (or files). There could be multiple causes for these issues, from source text, llm extraction, or other processing. We tried our best to make it as accurate as possible. However, it is hard to ensure these values are always correct. Use it carefully. Thanks again for your issue. Hello, thank you for providing the training dataset. I would like to know, for multi-turn dialogue data, what are the input and output formats during SFT training? Is the input composed of the previous dialogue turns, and the output the current turn? Hi, our sft data file follows the sharegpt format. In this format, each sample is a list of messages, such as: ` [ {"from":"user", "content": "input content"}, {"from":"assistant", "content": "output content for training"}, {"from":"user", "content": "input content2"}, {"from":"assistant", "content": "output content for training2"} ] ` Hence, we feed the entire multi-turn dialogue to LLMs, and the trainner automatically identifies the "assistant" part that we want to use to train LLMs , and calculate and optimize the loss. In short, if the dialog is composed of ['role_1 message1', 'role_2 message1', 'role_1 message2', 'role_2 message2'], and we want to train LLMs as role_2, the trainer simultaneously trains LLMs to predict 'role_2 message1' given ['role_1 message1'], and to predict 'role_2 message2' given ['role_1 message1', 'role_2 message1', 'role_1 message2'] > Hi, our sft data file follows the sharegpt format. In this format, each sample is a list of messages, such as: `[ {"from":"user", "content": "input content"}, {"from":"assistant", "content": "output content for training"}, {"from":"user", "content": "input content2"}, {"from":"assistant", "content": "output content for training2"} ]` > > Hence, we feed the entire multi-turn dialogue to LLMs, and the trainner automatically identifies the "assistant" part that we want to use to train LLMs , and calculate and optimize the loss. > > In short, if the dialog is composed of ['role_1 message1', 'role_2 message1', 'role_1 message2', 'role_2 message2'], and we want to train LLMs as role_2, the trainer simultaneously trains LLMs to predict 'role_2 message1' given ['role_1 message1'], and to predict 'role_2 message2' given ['role_1 message1', 'role_2 message1', 'role_1 message2'] Thank you for your prompt reply, and this paper is very helpful to me! Hello, and thank you for releasing CoSER. Could you clarify the license that applies to the source code in this repository? At current HEAD `624efc50db7be3a4e37cec6a1c58ed434dc9f2ce`, the repository does not appear to contain a LICENSE, COPYING, or NOTICE file. The paper/README describes the code and resources as publicly available, but that does not establish reuse terms. If possible, could you add an explicit code license file and separately clarify any different terms for the dataset and model weights? This would allow downstream research projects to determine whether direct code reuse is permitted.