mkturkcan / generative-agents Goto Github PK
View Code? Open in Web Editor NEWAn attempt to build a working, locally-running cheap version of Generative Agents: Interactive Simulacra of Human Behavior
License: MIT License
An attempt to build a working, locally-running cheap version of Generative Agents: Interactive Simulacra of Human Behavior
License: MIT License
When run the notebook on google colab
IndexError Traceback (most recent call last)
in <cell line: 2>()
7
8 for name in people:
----> 9 prompt = "You are {}. {} You are planning to: {}. You are currently in {} with the following description: {}. It is currently {}:00. The following people are in this area: {}. You can interact with them.".format(name, plans[name], location, town_areas[location], str(global_time), ', '.join(people))
10 people_description = []
11 for i in people:
IndexError: Replacement index 6 out of range for positional args tuple
No an issue as such, rather more a question.
I looked briefly over the code but could not see a time limiter or any specific exit criteria.
But that said, i not went all over it line by line.
Is this by design?
typo
Dear Team,
I'm writing this issue to discuss an aspect of the code related to the behavior, planning, and memory of the agents in the simulation. From my observation of the code, it seems that the agents do not alter their behaviors or plans based on their memories. Furthermore, the decision on which location to visit is not solely based on their plans.
Lack of Memory-based Decision Making: The agents do not seem to make decisions or alter their behaviors based on their memories. An agent's memory of past actions or encounters should influence their future behaviors and decisions. This crucial aspect of memory seems to be missing in the current implementation.
Non-dynamic Planning: The agents' plans do not update based on new memories or encounters. In a realistic scenario, an agent would adapt its plans according to its experiences and memories. However, this doesn't seem to be the case in the current code.
Memory Retrieval: The current memory retrieval only implements the importance aspect from the original text. It lacks the complexity of real-world memory retrieval, which also involves factors like recency, emotional intensity, etc.
I believe addressing these issues could significantly enhance the realism and complexity of the agent's behaviors and interactions in the simulation. Looking forward to your feedback and potential improvements to this aspect of the simulation.
Best Regards,
Zack
When run second block, an error occurred (error information attached below). It seems I lack the model. How should I get this model, and where should it be placed?
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Input In [8], in <cell line: 4>()
1 from transformers import pipeline
3 prompt = "Write an email about an alpaca that likes flan"
----> 4 model = pipeline(model="declare-lab/flan-alpaca-xl", device=0)
5 model(prompt, max_length=128, do_sample=True)
File ~/miniconda3/lib/python3.8/site-packages/transformers/pipelines/init.py:776, in pipeline(task, model, config, tokenizer, feature_extractor, image_processor, framework, revision, use_fast, use_auth_token, device, device_map, torch_dtype, trust_remote_code, model_kwargs, pipeline_class, **kwargs)
772 # Infer the framework from the model
773 # Forced if framework already defined, inferred if it's None
774 # Will load the correct model if possible
775 model_classes = {"tf": targeted_task["tf"], "pt": targeted_task["pt"]}
--> 776 framework, model = infer_framework_load_model(
777 model,
778 model_classes=model_classes,
779 config=config,
780 framework=framework,
781 task=task,
782 **hub_kwargs,
783 **model_kwargs,
784 )
786 model_config = model.config
787 hub_kwargs["_commit_hash"] = model.config._commit_hash
File ~/miniconda3/lib/python3.8/site-packages/transformers/pipelines/base.py:271, in infer_framework_load_model(model, config, model_classes, task, framework, **model_kwargs)
268 continue
270 if isinstance(model, str):
--> 271 raise ValueError(f"Could not load model {model} with any of the following classes: {class_tuple}.")
273 framework = "tf" if "keras.engine.training.Model" in str(inspect.getmro(model.class)) else "pt"
274 return framework, model
ValueError: Could not load model declare-lab/flan-alpaca-xl with any of the following classes: (<class 'transformers.models.auto.modeling_tf_auto.TFAutoModelForSeq2SeqLM'>, <class 'transformers.models.t5.modeling_tf_t5.TFT5ForConditionalGeneration'>).`
Closed
Or is it only possible to run it locally? As I don't have GPU's to run it with and no credit on Google Colab.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.