Edit model card
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer, StoppingCriteria, StoppingCriteriaList

stop_token_ids = tokenizer.convert_tokens_to_ids(["<EOT>"])

class StopOnTokens(StoppingCriteria):
    def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
        for stop_id in stop_token_ids:
            if input_ids[0][-1] == stop_id:
                return True
        return False
PROMPT_TEMPLATE = "USER:{user}<EOT>ASSISTANT:"

user = "Create a daily itinerary based on the given information. Our family is looking for a 9-day Morocco trip that has light to moderate activity levels."
prompts = PROMPT_TEMPLATE.format(user=user)
inputs = tokenizer(prompts, return_tensors="pt")

generation_kwargs = dict(
        inputs=inputs,
        max_new_tokens=2048,
        stopping_criteria=StoppingCriteriaList([stop]),
)

outputs = model.generate(**generation_kwargs)
ans = tokenizer.decode(outputs[0])[[len(prompts):]]

RedLing-7B was finrtuned based on RedPajama-7B. Here are some amazing results.

  1. USER: Design a syllabus for the given course. Students should be given a list of the chapters with brief explanations of each chapter's purpose. Programming for Everybody (Getting Started with Python)

ASSISTANT: Welcome to Programming for Everybody (Getting Started with Python)! In this course, we will cover the basics of programming in Python. We will start with the basics of Python syntax and data types, and then move on to more advanced topics such as control structures, functions, and object-oriented programming. By the end of the course, you will have a solid understanding of programming in Python and be ready to start creating your own programs.

Chapter 1: Introduction to Programming

  • Introduction to programming
  • Installing Python
  • Setting up a development environment
  • Hello, World!

Chapter 2: Control Structures

  • Control structures
  • Loops
  • If-else statements
  • For loops
  • While loops
  • Break and continue statements

Chapter 3: Functions

  • Functions
  • Creating a function
  • Calling a function
  • Returning from a function
  • Passing functions as arguments

Chapter 4: Objects and Classes

  • Objects and classes
  • Creating objects
  • Inheritance and polymorphism
  • Accessing object attributes and methods

Chapter 5: Data Types

  • Data types
  • Integers
  • Floating-point numbers
  • Strings
  • Lists
  • Tuples
  • Dictionaries

Chapter 6: Control Structures Part 2

  • Control structures part 2
  • Advanced loops
  • Advanced control structures

Chapter 7: File I/O

  • File I/O
  • Reading and writing files
  • Opening files
  • Closing files

Chapter 8: Web Development

  • Web development
  • HTML
  • CSS
  • JavaScript
  • Web APIs

Chapter 9: Testing

  • Testing
  • Unit testing
  • Integration testing
  • System testing

Chapter 10: Advanced Topics

  • Advanced topics
  • Object-oriented programming
  • Functional programming
  • Concurrency and parallelism
  • Data visualization

Congratulations on completing Programming for Everybody (Getting Started with Python)!

  1. USER: List the personality traits that are required to be successful in the given job. Social Media Marketer

ASSISTANT: The personality traits required to be successful in the job of a social media marketer include creativity, adaptability, attention to detail, excellent communication skills, and the ability to work well under pressure

  1. USER: Please list the courses that someone interested in the first course might like. Bitcoin and Cryptocurrency Technologies

ASSISTANT: If someone is interested in the first course, they might also be interested in the following courses:

  • Introduction to Blockchain
  • Cryptography and Network Security
  • Digital Currencies and Their Impact on the Financial System
  1. USER: Come up with the courses that one is supposed to take in order to be an expert in a given field. Graphic Design

ASSISTANT: To be an expert in graphic design, one should take courses in typography, layout, color theory, and design history. Additionally, one should have experience working with various design software such as Adobe Photoshop, Illustrator, and InDesign.

ASSISTANT2: To become an expert in graphic design, one should take courses in typography, layout design, color theory, and visual communication. Additionally, one should gain practical experience through internships or freelance work.

ChatGPT: Both response1 and response2 provide valuable information on the courses one should take to become an expert in graphic design. However, if we were to compare the two, response2 provides slightly more comprehensive information by mentioning visual communication as an important aspect of graphic design. It also emphasizes the importance of gaining practical experience through internships or freelance work, which is an essential component of becoming an expert in any field. Therefore, response2 can be considered slightly better in terms of providing a more well-rounded perspective on the necessary courses and experiences for becoming an expert in graphic design.

  1. USER: Create a daily itinerary based on the given information. Our family is looking for a 9-day Morocco trip that has light to moderate activity levels.

ASSISTANT: Morocco is a great choice for a family trip. Here's a 9-day itinerary that includes light to moderate activity levels:

Day 1: Arrival in Marrakech and visit the Bahia Palace and the Saadian Tombs. Day 2: Visit the Majorelle Gardens and the Menara Gardens. Day 3: Take a camel ride in the Sahara Desert. Day 4: Visit the Ait Ben Haddou Kasbah and the Ouzoud Waterfalls. Day 5: Visit the Djemaa el Fna square and the Ben Youssef Medersa. Day 6: Take a cooking class and learn how to make traditional Moroccan dishes. Day 7: Visit the Kasbah of the Udayas and the Hassan II Mosque. Day 8: Visit the Dakhla Oasis and the Todra Gorge. Day 9: Departure from Marrakech.

This itinerary includes a mix of city exploration, outdoor activities, and cultural experiences. It's a great way to see the highlights of Morocco while staying active and engaged.

  1. instruction: Give students tips on how to keep their nerves under control during class presentations.

response1:

  1. Practice, practice, practice: The more you practice, the more comfortable you will become with the material and the delivery.

  2. Use visual aids: Visual aids such as slides or props can help keep your audience engaged and prevent you from feeling nervous.

  3. Use vocal variety: Vary your tone, pitch, and volume to keep your audience interested.

  4. Focus on breathing: Take deep breaths before and during your presentation to calm your nerves.

  5. Use positive self-talk: Tell yourself that you are capable and prepared for the task at hand.

  6. Seek support: Reach out to friends, family, or a professional mentor for support and encouragement.

  7. Be confident: Believe in yourself and your ability to deliver a successful presentation.

  8. Visualize success: Imagine yourself delivering a successful presentation and receiving positive feedback from your audience.

  9. Eliminate distractions: Try to eliminate any potential distractions before your presentation, such as turning off your phone or finding a quiet place to take notes.

  10. Take a break: If you feel overwhelmed or stressed during your presentation, take a break and come back with fresh energy and focus.

response2: Here are some tips to help students keep their nerves under control during class presentations:

  1. Practice your presentation beforehand to feel more confident.
  2. Take deep breaths to calm yourself down.
  3. Visualize a successful presentation to boost your confidence.
  4. Use positive self-talk to motivate yourself.
  5. Focus on the content of your presentation rather than the audience.
  6. Engage with the audience by making eye contact and asking questions.
  7. Be aware of your body language and posture to project confidence.
  8. Take a break if you feel overwhelmed.
Downloads last month
4
Model is too large to load in Inference API (serverless). To try the model, launch it on Inference Endpoints (dedicated) instead.

Spaces using RootYuan/RedLing-7B-v0.1 2